ActiveX的内存不足错误 [英] Out of Memory Error for ActiveX

查看:137
本文介绍了ActiveX的内存不足错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建对象并调用对象的功能,然后在VB 6中销毁Activex exe的对象.一段时间后,我收到了内存不足的错误消息.出现此错误后,我无法再创建ActiveX exe的对象.

代码:

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

推荐答案

成员2437295写道:
Member 2437295 wrote:

内存不足错误



显然是内存泄漏/未收集的情况.您说您正在破坏对象,但尚未将它们收集起来,并且正如您所说的那样,它已经进行了很多次,所以它一定会发生.

您需要在代码中共享有关如何销毁它以及为什么要创建许多activeX的代码.这将帮助人们为您解决该问题.
此外,在短时间内需要创建大量ActiveX对象的情况下,它的设计/速度似乎不太好.



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.


这篇关于ActiveX的内存不足错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆