That's not a destructor. It's a finalizer. It will be run when your object is finalized.
On 3/3/06, Simon Cansick <[EMAIL PROTECTED]> wrote: > > Morning all, > > I'm having trouble running cleanup code in my .Net component as the > destructor doesn't seem to run. > > My component is accessed through a CCW (standard regasm generated .reg > file) from VB6 using Late Binding, I can't change this aspect (As > explicitly call Dispose or something). I need the finalizer to run by > the fact that the reference count is zero, but it never seems to do this > (ie run the ~destructor). > > Is there something I can change in the CCW creation or in the .Net > components attributes to get the code in my destructor firing? > > Thanks for any help. > > Simon James > > > > > The contents of this email are confidential to the intended recipient > and may not be disclosed. Although it is believed that this email and > any attachments are virus free, it is the responsibility of the recipient > to confirm this. > > Smith & Williamson Corporate Finance Limited - A member of the London > Stock Exchange. > A member of M&A International Inc. http://www.mergers.net Registered in > England No. 4533970. Authorised and regulated by the Financial Services > Authority > Smith & Williamson Investment Management Limited, Registered No. 976145. > Authorised and regulated by the Financial Services Authority. > Smith & Williamson Pension Consultancy Limited - Independent Intermediary. > Registered No. 3133226. Authorised and regulated by the Financial Services > Authority. > Smith & Williamson Fund Administration Limited, Registered No. 1934644. > Authorised and regulated by the Financial Services Authority. > Smith & Williamson Limited - A member of Nexia International. Registered > in England No. 4534022. Regulated by the Institute of Chartered Accountants > in England & Wales for a range of investment business activities. > NCL Investments Limited, Registered No. 1913794. > Member of the London Stock Exchange authorised and regulated by the > Financial Services Authority. > > Registered Office: 25 Moorgate, London EC2R 6AY > Telephone: 020 7131 4000 http://www.smith.williamson.co.uk > > Nexia Audit Limited - A member of Nexia International. Registered in > England No. 4469576. Registered to carry on audit work and regulated by > the Institute of Chartered Accountants in England & Wales for a range of > investment business activities. > > Registered Office: 25 Moorgate, London EC2R 6AY > Telephone: 020 7131 4000 http://www.nexiaaudit.co.uk > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > -- Brad Wilson http://www.dotnetdevs.com/ http://www.agileprogrammer.com/dotnetguy/ "Women and cats will do as they please, and men and dogs should relax and get used to the idea." - Robert A. Heinlein =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com