Article View: borland.public.csharpbuilder.language.csharp
Article #233Re: Where to cleanup an object instance
From: Francois PIETTE [ICS - MidWare]
Date: Wed, 26 Jul 2006 16:15
Date: Wed, 26 Jul 2006 16:15
19 lines
1702 bytes
1702 bytes
>> I'm porting Delphi code to C#. >> In a Delphi class, you cleanup a class instance from the destructor. But >> in >> C#, there is no destructor. > > Generally you want to implement a finalizer and the IDisposable > interface. Its a little tricky to do it correctly but if you do a web > search on the IDisposable pattern you should find plenty of good > resources. I found this one: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconfinalizedispose.asp Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- francois.piette@overbyte.be The author for the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be
Technical Details
Message-ID:
<44c79807@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44c66807@newsgroups.borland.com> <1314sxx1p3xv.dlg@dlg.marcrohloff.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,57d58bae5e2b1da0 X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Francois PIETTE [ICS - MidWare]" <francois.piette@overbyte.be> Newsgroups: borland.public.csharpbuilder.language.csharp References: <44c66807@newsgroups.borland.com> <1314sxx1p3xv.dlg@dlg.marcrohloff.com> Subject: Re: Where to cleanup an object instance Date: Wed, 26 Jul 2006 18:15:30 +0200 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 81.244.51.11 Message-ID: <44c79807@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1153931271 81.244.51.11 (26 Jul 2006 09:27:51 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail