Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7007257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:35:01+00:00 2026-05-27T21:35:01+00:00

My managed application consumes legacy functionality exposed by a native COM dll via a

  • 0

My managed application consumes legacy functionality exposed by a native COM dll via a managed wrapper. I cannot change the COM dll nor its managed wrapper.

  • The managed wrapper is in essence automatically generated by a script, given the COM type declarations as input.
  • The COM layer will internally access network, file system, graphics and other unmanaged resources.
  • Most managed types in the wrapper are created using factory-like methods.
  • Most managed types in the wrapper has no way of manually trigger clean-up or resource-release.
  • No managed type in the wrapper implements IDisposable.
  • No managed type in the wrapper explicitly implements a finalizer.

I feel that I’m missing a lot in my application layer from this API that I’d like to see in order to ensure that unmanaged resources are properly being released.

The question is if I’m right in my understanding of this:

Given that the application layer no longer references an object from the managed wrapper, there’s no way that underlying native objects used by that managed object can ever be released until an exposed cleanup method explicitly does so.

Am I correct in that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:35:02+00:00Added an answer on May 27, 2026 at 9:35 pm

    No that is not quite correct. When the garbage collector collects managed types that are referencing the COM types those references will be dereferenced using the COM Release call. At ths point the unmanaged resources will be released assuming nothing else is reference the COM object instance.

    However unless you are calling GC.Collect() (a fairly draconian thing to do) then it is possible for those unmanaged resource are held onto for far, far longer than necessary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wrapper managed application(.net) over a COM Component(created using vb6) where Com
I have successfully implemented interop beftween Win32 application and managed .Net dll as described
I want to use an unmanaged COM library (specifically, Skype4COM) in a managed application
Our application is a hybrid Win32 unmanaged application and a .NET 2.0 managed application.
I'm trying to load a mixed managed application compiled and targeted for Framework 3.5
How to make use of jndi in a stand-alone (non-managed) application? App and Tomcat6
I have a managed Windows application that loads a managed C++ component that uses
In a Direct3D application (managed), should I recreate the vertex buffer every time I
I have the following problem: I implemented a managed mobile application for Windows Mobile
I've come across an issue where a web application has managed to create a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.