On Wed, Mar 25, 2009 at 9:33 AM, Rick McGuire <object.r...@gmail.com> wrote:

> Well, in this case, it is actually working as designed.  The use of
> WeakReferences allows a package file to be kept in the global cache,
> while at the same time not creating a memory leak.  As long as there
> are some references to the package around to keep things alive, the
> weak reference will never get cleared and the package is not garbage
> collected.  Once all users of the package go away, the weak reference
> can be cleared and the package memory reclaimed.

Okay.  But, once the RexxStart() terminates, shouldn't all users of
the package have gone away?

The next time RexxStart() is invoked, the prologue of the package
should run again, shouldn't it?

return_code = RexxStart(1,              /* one argument */
                      rxargv,         /* argument array */
                      programName,    /* Rexx procedure name */
                      NULL,           /* use disk version */
                      "CMD",          /* default address name */
                       RXSUBROUTINE,   /* calling as a subroutine */
                       NULL,           /* no exits used */
                       &rc,            /* converted return code */
                       &retstr);       /* returned result */

/* RexxStart() has terminated here.  Now call RexxStart() a
secondtime.  All users of the package are gone?  But, the proglogue
does not execute. */


return_code = RexxStart(1,              /* one argument */
                      rxargv,         /* argument array */
                      programName,    /* Rexx procedure name */
                      NULL,           /* use disk version */
                      "CMD",          /* default address name */
                       RXSUBROUTINE,   /* calling as a subroutine */
                       NULL,           /* no exits used */
                       &rc,            /* converted return code */
                       &retstr);       /* returned result */

--
Mark Miesfeld

------------------------------------------------------------------------------
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to