|
-
March 18th, 1999, 09:50 PM
#1
Releasing memory for an active x component
I have created an active x control using VB (I know probably my first mistake) it emulates a textbox control, created to draw our specialized fonts, and supports blinking,and animating, done with timers. I have subclassed this control and created timers and watch for them in my message dispatch, not using timer controls.
anyway with what that little info out of the way, I use these controls in arrays of controls in other vb projects, i'm constantly resizing the array, by adding and unloading them, but it seems that when I unload them, vb doesn't release all the memory associated with them, and when i load new ones it just adds more memory. I've created a destroy mechanism in the control, that i call right before I unload the control. which replaces the old win proc and kills the timers associated to it and I kill the specialized font classes that are being used in this control. but the memory isn't being released.
if anyone has suggestions on how I can get the memory released, i would really appreciate it.
thanks
darryl
-
March 18th, 1999, 09:55 PM
#2
Re: Releasing memory for an active x component
After unloading it try explicit destruction
Set Mycontrol(I) = Nothing
-
March 18th, 1999, 10:11 PM
#3
Re: Releasing memory for an active x component
thanks vinayak, that seems to have helped.
I must've vegged out on that one. I guess
I was thinking that you couldn't set a control to nothing
not realizing you can't do that with design time created
control but you can with runtime created ones. Again thanks
alot.
Darryl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|