C
Chris DiPierro
Let's say I do the following:
Object A lives "forever" and periodically creates instances of Object B.
Object B triggers events, that Object A registers for immediately upon
the creation of Object B.
Object B is later dereferenced.
Do my handlers to the now dereferences Object B ever get garbage
collected? Or should I explicitly unregister for the events before I
dereference Object B?
Object A lives "forever" and periodically creates instances of Object B.
Object B triggers events, that Object A registers for immediately upon
the creation of Object B.
Object B is later dereferenced.
Do my handlers to the now dereferences Object B ever get garbage
collected? Or should I explicitly unregister for the events before I
dereference Object B?