R
Robert Zurer
I have a large pool of business objects all referencing one another in
various ways.
In the client application I want to do something like
employee.Delete();
Behind the scenes, I want to remove all references to the object
allowing it to be garbage collected. I then want to remove the physical
representation of the object from persistance. Unless I have missed a
scenario, the references to the object can be deleted in two ways
MyParentObject.EmployeeProp = null; or
MyEmployeeList.Remove(employee);
In order to do this, I have to maintain some kind of internal lists of
these relationships.
My questions are --
1) Have I missed any other way that an object can be referenced?
2) Isn't there an easier way? Doesn't the GC already have this list
somewhere?
Robert Zurer
(e-mail address removed)
various ways.
In the client application I want to do something like
employee.Delete();
Behind the scenes, I want to remove all references to the object
allowing it to be garbage collected. I then want to remove the physical
representation of the object from persistance. Unless I have missed a
scenario, the references to the object can be deleted in two ways
MyParentObject.EmployeeProp = null; or
MyEmployeeList.Remove(employee);
In order to do this, I have to maintain some kind of internal lists of
these relationships.
My questions are --
1) Have I missed any other way that an object can be referenced?
2) Isn't there an easier way? Doesn't the GC already have this list
somewhere?
Robert Zurer
(e-mail address removed)