C
cs
I have an object X, and an object Y.
Y is the only object that has a reference to X.
X has an event. Objects A, B, C register for this event but dont keep a
reference to object X.
When whoever owns Y is done with it, and Y is garbag collected, what happens
to X and to the Objects that registered for the event? will those event
registration prevent X from being garbage collected?
Y is the only object that has a reference to X.
X has an event. Objects A, B, C register for this event but dont keep a
reference to object X.
When whoever owns Y is done with it, and Y is garbag collected, what happens
to X and to the Objects that registered for the event? will those event
registration prevent X from being garbage collected?