Re: What objects must I clean up to avoid memory leaks?

From: J French (erewhon_at_nowhere.com)
Date: 05/11/04


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



Relevant Pages

  • What objects must I clean up to avoid memory leaks?
    ... my previous MS-Basic experience was with ... Under DOS, it sufficed to let things fall out of scope at which point ... So what sorts of objects do I need to explicitly destroy, ...
    (microsoft.public.vb.general.discussion)
  • Re: ActionListener scoping
    ... an ActionListener, or return anything, or modify local method ... with its parent method. ... accessable by the method since the class scope is the method's parent ...
    (comp.lang.java.help)
  • Re: limiting search scope
    ... index server. ... Here's what I have set up to filter my 'parent' folder ... index service and to limit the scope of the search. ...
    (microsoft.public.inetserver.indexserver)
  • Re: Object scope issue...
    ... So, the "update" method on the Parent class, inserts or updates parent ... What I was doing in my "Save" command button code was setting the parent ... I only do a database update. ... Is this typically how one would control an objects scope - by setting as ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Timing Error
    ... Why can you not call a function or a sub in the child from the parent? ... the scope of the function Public and call it using the fully referenced ... record in the Page subform. ...
    (microsoft.public.access.formscoding)