Click here to Skip to main content
11,799,282 members (75,915 online)
Click here to Skip to main content

Tagged as

Proper Way of Releasing COM Objects in .NET

, 2 Aug 2011 CPOL 17.3K 7
Please let me suggest that "FinalReleaseComObject" is not the way to go. If you write structured code, you should never need it. Strictly following Microsoft Patterns & Practices:1) Declare & instantiate COM objects at the last moment possible.2) ReleaseComObject(obj) for ALL...


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

3 Dec 2012
1 alternative  
Fully release resources engaged by COM objects.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Crooked path
Architect Intergraph Corporation
United States United States
I've spent the last 30 years building durable code for government, healthcare, and utility companies, from Fortran 4 to C#, on databases from pre-SQL ISAM ones to Oracle 11g, and on platforms from the VMS to Linux (not to exclude all common permutations by Microsoft). In my spare time, I teach classes on whole-system design principles from configuring SANS, programming switches, to advanced principles in C# for creating secure, durable code.

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.151002.1 | Last Updated 2 Aug 2011
Article Copyright 2011 by Crooked path
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid