Re: What objects must I clean up to avoid memory leaks?
From: J French (erewhon_at_nowhere.com)
Date: 05/11/04
- Next message: Jack: "Re: DoEvents versus Sleep() inside the Loop"
- Previous message: Rick Rothstein: "Re: Passing a Runtime Parameter to a VB6 EXE: How To?"
- In reply to: U-CDK_CHARLES\\Charles: "What objects must I clean up to avoid memory leaks?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 11 May 2004 18:12:27 +0000 (UTC)
On Tue, 11 May 2004 08:19:07 -0700, "U-CDK_CHARLES\\Charles" <"Charles
Krug"@cdksystems.com> wrote:
>List:
>
>As I've posted previously, my previous MS-Basic experience was with
>QB4.5 (SWEET!!)
>
>Under DOS, it sufficed to let things fall out of scope at which point
>they'd be "destroyed" (not really, but the dos equivalent).
>
>But of course I'm reading about memory leaks . . .
>
>So what sorts of objects do I need to explicitly destroy, and which will
>die when my app does?
Try it another way
Track all Initiliaze and Terminate events in Forms, UserControls and
Classes (keep a list in a .BAS module - simply a string or an Array)
so you can always see what is alive at any point in time.
Communicate with Parent via RaiseEvent rather than passing down a
reference to the Parent (unless the problem is dire)
Personally I give just about all Classes etc a 'Free' method that does
a rigorous cleanup before doing : Set oMyThing = Nothing
- Next message: Jack: "Re: DoEvents versus Sleep() inside the Loop"
- Previous message: Rick Rothstein: "Re: Passing a Runtime Parameter to a VB6 EXE: How To?"
- In reply to: U-CDK_CHARLES\\Charles: "What objects must I clean up to avoid memory leaks?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|