Skip to content

Memory leak when using observe #208

@arosequist

Description

@arosequist

Runnable example

If you observe an object, I think it stays in memory after all references to it are gone (even if you unobserve it).

I'm not certain, but I suspect that the beforeDict is what's holding on to it. When the observer is created, we push onto the array, but we never splice it out.

It would be great if we could use weak references in that array, but I don't think that's possible in JavaScript. Can we just splice it in the unobserve function?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions