Wrox Programmer Forums
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2004, 07:24 AM
Authorized User
 
Join Date: Sep 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default dispose

Hi,

I am creating an application, and Visual Studio has automatically included a boolean Dispose method.....

I don't know whether to keep this or not... as I thought garbage collection was taken care of automatically.....

somebody please explain..... much appreciated

 
Old February 24th, 2004, 07:54 AM
Authorized User
 
Join Date: Sep 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK... I think this is only required for unmanaged resources..... but another question arises, with regards to unmanaged resources..

could someon eplease explain what are unmanaged resources in C#.... with examples if possible.

much appreciated.....
 
Old February 24th, 2004, 02:10 PM
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://msdn.microsoft.com/library/de...izeDispose.asp

The above link explains the Managed and Unmanaged resources, and use of Dispose and Fnalize methods. I think this would help you.

Regards
Pradeep P

It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
 
Old February 26th, 2004, 05:17 AM
Authorized User
 
Join Date: Sep 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for the reply....

I have realised now that unmanaged resources should be dealt with... but now the problem arises about what areunmanaged resources.....

I wouldn't know whether to implement dispose or not as I honestly do not know whether I am dealing unmanaged resources or not....?








Similar Threads
Thread Thread Starter Forum Replies Last Post
Dispose() methods bpevangelista BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 2 May 12th, 2007 11:15 PM
Dispose Pattern guntank C# 0 September 26th, 2006 10:08 PM
Dispose() pzmrcd .NET Framework 1.x 2 March 2nd, 2006 03:19 PM
Question : Dispose mike_abc Pro VB.NET 2002/2003 1 May 14th, 2005 02:17 PM
General Question about Dispose DKS BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 22nd, 2003 06:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.