Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating object and calling a Function of object and then destroying object of Activex exe in VB 6. After some time I am getting the error as Out of Memory. After this error, I am not able to create the object of ActiveX exe anymore.

Code:
Dim oABC   As Object
Dim str As String
Set oABC = CreateObject("Abc.xyz")
oABC.Submit (str)
Set oABC = Nothing
Posted
Updated 9-Jun-10 9:11am
v4

1 solution

Member 2437295 wrote:
Out of Memory Error


It's clearly a case of memory leak/not collected. You say you are destroying objects but they are not yet collected and as you said you are doing it number of times, so it must be happening.

You need to share across the code of how you are destorying it and why you are creating number of activeX. That will help people in resolving that for you.
Further, it does not looks a good design/slow where you need to create number of ActiveX objects in a short while.
 
Share this answer
 
v2
Comments
Member 2437295 9-Jun-10 13:31pm    
Yes. I am destroying object of activex exe by using nothing. My activex is messenger kind of think which move file from one place to another place. Now If I have 1000 files to move by using this activex exe.After moving 800-900 files I getting the Out of memory error.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900