observed icon indicating copy to clipboard operation
observed copied to clipboard

disable default weakrefing

Open mateuszzebek opened this issue 3 years ago • 2 comments

i want to make sure that my observers do not disappear at any circumstance due to weakrefing, garbage collector, etc. - how can i achieve it?

mateuszzebek avatar Jan 26 '22 17:01 mateuszzebek

You have to keep the observer in scope somewhere in the code. Can you send a self contained minimal working example of the problem you're trying to solve?

DanielSank avatar Jan 26 '22 19:01 DanielSank

I think this probably has nothing to do with weakrefing. Weak references are used in this module to make sure that the observers do not prevent garbage collection of the things being observed. The lifetime of observers themselves depends on how your code maintains references to them...

DanielSank avatar Jan 26 '22 19:01 DanielSank