Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
AnswerRe: Distribute MSDE with your C# Application? Pin
Heath Stewart8-Dec-03 2:27
protectorHeath Stewart8-Dec-03 2:27 
GeneralC# New Project Dialog Box Pin
Member 7525907-Dec-03 12:48
Member 7525907-Dec-03 12:48 
GeneralRe: C# New Project Dialog Box Pin
Heath Stewart8-Dec-03 2:24
protectorHeath Stewart8-Dec-03 2:24 
GeneralRe: C# New Project Dialog Box Pin
Member 7525908-Dec-03 9:21
Member 7525908-Dec-03 9:21 
GeneralHTML FORMULAR Pin
buzman7-Dec-03 2:12
buzman7-Dec-03 2:12 
GeneralRe: HTML FORMULAR Pin
Heath Stewart7-Dec-03 4:48
protectorHeath Stewart7-Dec-03 4:48 
GeneralRe: HTML FORMULAR Pin
Alexander Kent7-Dec-03 16:28
Alexander Kent7-Dec-03 16:28 
QuestionHow can I remove all references to an object? Pin
bzurer7-Dec-03 1:57
bzurer7-Dec-03 1:57 
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
robert@zurer.com
AnswerRe: How can I remove all references to an object? Pin
Heath Stewart7-Dec-03 4:43
protectorHeath Stewart7-Dec-03 4:43 
GeneralRe: How can I remove all references to an object? Pin
bzurer7-Dec-03 5:16
bzurer7-Dec-03 5:16 
GeneralRe: How can I remove all references to an object? Pin
Heath Stewart7-Dec-03 10:18
protectorHeath Stewart7-Dec-03 10:18 
GeneralRe: How can I remove all references to an object? Pin
Paul Evans8-Dec-03 6:55
Paul Evans8-Dec-03 6:55 
GeneralRe: How can I remove all references to an object? Pin
bzurer8-Dec-03 7:24
bzurer8-Dec-03 7:24 
Generalfile menu and toolbar Pin
steve_rm6-Dec-03 19:25
steve_rm6-Dec-03 19:25 
GeneralRe: file menu and toolbar Pin
leppie6-Dec-03 22:19
leppie6-Dec-03 22:19 
GeneralRe: file menu and toolbar Pin
Heath Stewart7-Dec-03 4:36
protectorHeath Stewart7-Dec-03 4:36 
GeneralIUrlHistory Interfaces Pin
Dave Conn6-Dec-03 18:44
Dave Conn6-Dec-03 18:44 
GeneralRe: IUrlHistory Interfaces Pin
Heath Stewart7-Dec-03 4:52
protectorHeath Stewart7-Dec-03 4:52 
GeneralVisual Studio AddIn problem - adding a sub-menu to the Edit menu Pin
Chris Morrison6-Dec-03 18:26
Chris Morrison6-Dec-03 18:26 
GeneralRe: Visual Studio AddIn problem - adding a sub-menu to the Edit menu Pin
jparsons6-Dec-03 22:25
jparsons6-Dec-03 22:25 
GeneralRe: Visual Studio AddIn problem - adding a sub-menu to the Edit menu Pin
Nick Parker7-Dec-03 4:46
protectorNick Parker7-Dec-03 4:46 
GeneralRe: Visual Studio AddIn problem - adding a sub-menu to the Edit menu Pin
Chris Morrison7-Dec-03 5:04
Chris Morrison7-Dec-03 5:04 
GeneralRe: Visual Studio AddIn problem - adding a sub-menu to the Edit menu Pin
Heath Stewart7-Dec-03 10:27
protectorHeath Stewart7-Dec-03 10:27 
GeneralRe: Visual Studio AddIn problem - adding a sub-menu to the Edit menu Pin
Nick Parker7-Dec-03 10:51
protectorNick Parker7-Dec-03 10:51 
GeneralRe: Visual Studio AddIn problem - adding a sub-menu to the Edit menu Pin
Heath Stewart7-Dec-03 10:55
protectorHeath Stewart7-Dec-03 10:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.