what it means?

  • Thread starter Thread starter kathy
  • Start date Start date
K

kathy

I read MSDN help file "Class vs. Component vs. Control"
and it said I need to implement IDisposable whenever I
use the external resources. What "external resources"
include? bitmap, icon, Mutex, ...?
 
Hi Kathy

Yes, external resources include bitmaps, sounds, COM objects, etc, basically anything that is allocated by you. Since these resources are not automatically garbage
collected, you need to free them when you're finished with them (otherwise you'll have a memory leak). The recommended way to do this freeing through the Dispose pattern.

http://msdn.microsoft.com/library/d.../en-us/cpgenref/html/cpconfinalizedispose.asp

Hope that helps

-Chris

--------------------
Content-Class: urn:content-classes:message
From: "kathy" <[email protected]>
Sender: "kathy" <[email protected]>
Subject: what it means?
Date: Mon, 25 Aug 2003 08:19:20 -0700
Lines: 4
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcNrHEIgJn0CF9h/Q7mNlcZJKdtrDA==
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:105973
NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.general

I read MSDN help file "Class vs. Component vs. Control"
and it said I need to implement IDisposable whenever I
use the external resources. What "external resources"
include? bitmap, icon, Mutex, ...?


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
 
Back
Top