.NETGURU
Destroying Objects
Messages   Related Types
This message was discovered on ASPFriends.com 'aspng' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Anthony Young
Is there a need to dereference objects in C#, ie: objGeneric = null

Reply to this message...
 
    
Minh Truong
Nope... when objects fall out of scope, they'd be taken care of by the
framework...

----- Original Message -----
From: "Anthony Young" <Click here to reveal e-mail address>
To: "aspng" <Click here to reveal e-mail address>
Sent: Tuesday, May 01, 2001 11:07 AM
Subject: [aspng] Destroying Objects

[Original message clipped]

Reply to this message...
 
    
(VIP)
I would argue that it is good programming practice to release the objects
yourself. Along with a good notation it is easy to understand what an
objects scope is when you see an explicit Object = Nothing at the end of a
procedure.

-----Original Message-----
From: Minh Truong [mailto:Click here to reveal e-mail address]
Sent: Tuesday, May 01, 2001 9:48 AM
To: aspng
Subject: [aspng] Re: Destroying Objects

Nope... when objects fall out of scope, they'd be taken care of by the
framework...

----- Original Message -----
From: "Anthony Young" <Click here to reveal e-mail address>
To: "aspng" <Click here to reveal e-mail address>
Sent: Tuesday, May 01, 2001 11:07 AM
Subject: [aspng] Destroying Objects

[Original message clipped]

| [aspng] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngcurious.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Stephen Wright
I think the 'lose' objects are picked up by the garbage collector. On a
high volume site you could run short on resources before the garbage
collector has a chance to free them.

----- Original Message -----
From: <Click here to reveal e-mail address>
To: "aspng" <Click here to reveal e-mail address>
Sent: Tuesday, May 01, 2001 1:19 PM
Subject: [aspng] Re: Destroying Objects

[Original message clipped]

Reply to this message...
 
    
Minh Truong
That's the idea, when resources go low, the GC kicks in and tries to give
you more back. Plus, in .NET, there's no way to explitly _kill_ the object
yourself. You can call the GC explicitly, but that's an expensive operation
and you're getting into _when_ to call the GC, which defeats the purpose of
having a GC in the first place.

If your objects are expensive, you may want to have a method to release
resources manually.

----- Original Message -----
From: "Stephen Wright" <Click here to reveal e-mail address>
To: "aspng" <Click here to reveal e-mail address>
Sent: Tuesday, May 01, 2001 1:55 PM
Subject: [aspng] Re: Destroying Objects

[Original message clipped]

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification