Link to home
Start Free TrialLog in
Avatar of kbalaraju
kbalaraju

asked on

Memory doesnt freed on Destroying the COM objects.

I'm using a COM Object in Visual Basic. Following statement is not removing the allocated memory for that object.
set objCOM = nothing

This memory is freed up only when I close the Visual Basic application. COM Interface was developed using C++ and I'm caling those objects in Visual Basic.

Is it the VB Problem or problem in COM Interface creation in C++?

Please Help. THanks in Advance.

Raju
Avatar of Dave_Greene
Dave_Greene

I would look at the COM Component first.  Doesn't sound like a VB issue, unless you still have a reference to the component when you are trying to kill it...
There is probably something missing in the destructor of the C++ class.
Last 10 Grades Given:  A C B C C C A C C C
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
mlmcc, using your logic:
If you don't like my report, do not comment it.  There may be reasons for my reports.
I would check if this happens on a form with one instance of the 'accussed' object.

' Form1 code
Option Explicit

Private Sub Form_Click()
    Form2.Show vbModal    ' show test form
    Set Form2 = Nothing
End Sub
Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.

To view your open questions, please click the following link(s) and keep them all current with updates.
https://www.experts-exchange.com/questions/Q.20138939.html
https://www.experts-exchange.com/questions/Q.20270886.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
Avatar of kbalaraju

ASKER

THanks for all your help. I couldnt fix the problem but thanks for responding.