Skip to content

Windows Registry Leak Flaw #18

Open
@razzraziel

Description

@razzraziel

EditorPrefs.SetBool(string.Format($"{c.Value.atr.name}{c.Value.props[0].name}{target.GetInstanceID()}"), c.Value.expanded);

InstanceIDs are not constant and changing all the time, for every different object, for every different scene, for every different Unity session and for every play mode change. So you're constantly filling Windows Registry by setting new bools for all foldout changes. And registry record changes the name with foldout name so after a while, it is hard to keep track, they're all over the place.

My Unity registry 20-30x bigger size right now with all temporarily used instance ids.

Also the behavior was wrong so I was changed a while ago. Because I don't want to set foldout expand seperately for every object, they should have all expanded or all folded for same foldout with single click, like as Unity foldouts.

EditorPrefs.SetBool(string.Format($"{c.Value.atr.name}{c.Value.props[0].name}"), c.Value.expanded);
This is better behavior and also won't create thousands of registry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions