[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Memory doesnt freed on Destroying the COM objects.

Posted on 2001-06-20
8
Medium Priority
?
279 Views
Last Modified: 2013-11-25
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
0
Comment
Question by:kbalaraju
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6212089
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...
0
 
LVL 5

Expert Comment

by:gbaren
ID: 6212094
There is probably something missing in the destructor of the C++ class.
0
 
LVL 15

Expert Comment

by:ameba
ID: 6212538
Last 10 Grades Given:  A C B C C C A C C C
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 101

Accepted Solution

by:
mlmcc earned 300 total points
ID: 6212820
I would agree with gbaren.

I teach and use C++ in addition to VB.  If the C++ object is not releasing the memory when it is no longer needed you would have the problem.

How do you know the memory isn't released?  It may be being release but improperly so the system doesn't know it is free until the VB app is done.

Does the C++ COM object have a destroy function you can call?  How do you create the COM object?  The destructor s probably called by putting a ~ in front of the C++ object creator.

good luck
mlmcc

ameba
If you don't like the way a person grades don't comment on his questions.  There may be reasons for the grades.

0
 
LVL 15

Expert Comment

by:ameba
ID: 6212863
mlmcc, using your logic:
If you don't like my report, do not comment it.  There may be reasons for my reports.
0
 
LVL 15

Expert Comment

by:ameba
ID: 6212891
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
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6858383
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.
http://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.  http://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.
http://www.experts-exchange.com/questions/Q.20138939.html
http://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 http://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.
0
 

Author Comment

by:kbalaraju
ID: 6858454
THanks for all your help. I couldnt fix the problem but thanks for responding.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question