|
-
Oct 6th, 2000, 06:44 AM
#1
Thread Starter
New Member
I am running vb6 sp3 on 2000 sp1. I have been happily adding vb controls at runtime using xxx.controls.add "name" etc. then removing them with xxx.controls.remove name. The controls are quite big but not stupidly so. The form recreates itself each time its loaded from a template from a database, and removes all the controls when it is done. I've set all my objects to nothing before unloading the form. Each time the form each called more memory is used by the app, each time it is unloaded the amount remains, after many calls, I get bizarre errors (50003 unexpected error among them) and strange resource problems, (currupt icons, lack of text writing to windows). This occurs either running from source code in the IDE or running a compiled app. I can not use SP4 as my app crashes badly when compiled with sp4, problems with controls again.
Any advise ?
Cheers
Ian.
-
Oct 8th, 2000, 09:38 AM
#2
Thread Starter
New Member
I've solved it. I had pointers to the controls I created, xxx.controls.remove (name) will not free memory if there is a pointer to the control. If you null the pointer after, it will still not free the memory. You must null all pointers to a control before removing it.
Ian.
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
|