Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP

DESTROY in cleanup handler

 

 

ModPerl asp RSS feed   Index | Next | Previous | View Threaded


moseley at hank

Apr 23, 2009, 10:47 AM

Post #1 of 2 (3210 views)
Permalink
DESTROY in cleanup handler

Is there a purpose for using a cleanup handler (to call DESTROY) in
Apache::ASP instead of cleaning up at the end of the response handler?

What looks like happened is that due to circular references DESTROY
was not getting called at the end of the request so that a handler was
used to explicitly call DESTROY. But, I'm not clear if there were
other reasons (e.g. need to keep the Apache::ASP object around after
the response was completed). Is there another reason?

The Apache::ASP object holds child objects that reference the
Apache::ASP parent object. Those could be weakened. Also $Session,
$Application, etc. are not localized when running an .asp page so they
hold references until the following request when they are set again
(via InitPackageGlobals).

Thanks,


--
Bill Moseley.
moseley [at] hank
Sent from my iMutt

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


moseley at hank

Apr 29, 2009, 7:41 AM

Post #2 of 2 (3039 views)
Permalink
Re: DESTROY in cleanup handler [In reply to]

Anyone still around that is familiar with Apache::ASP's internals?

On Thu, Apr 23, 2009 at 10:47:42AM -0700, Bill Moseley wrote:
> Is there a purpose for using a cleanup handler (to call DESTROY) in
> Apache::ASP instead of cleaning up at the end of the response handler?
>
> What looks like happened is that due to circular references DESTROY
> was not getting called at the end of the request so that a handler was
> used to explicitly call DESTROY. But, I'm not clear if there were
> other reasons (e.g. need to keep the Apache::ASP object around after
> the response was completed). Is there another reason?
>
> The Apache::ASP object holds child objects that reference the
> Apache::ASP parent object. Those could be weakened. Also $Session,
> $Application, etc. are not localized when running an .asp page so they
> hold references until the following request when they are set again
> (via InitPackageGlobals).
>
> Thanks,

--
Bill Moseley.
moseley [at] hank
Sent from my iMutt

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl

ModPerl asp RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.