Re: [Userlogin-users] Re: [Mason] UserLogin 0.5
Status: Beta
Brought to you by:
johnkeiser
From: John K. <jk...@in...> - 2001-09-02 18:51:41
|
On 02 Sep 2001 12:35:53 +0200, Amodiovalerio Verde wrote: > I look a little further inside UserLogin. > > I'm not so good with 'object-like' programming, but it seems that the > DESTROY constructor in Postgres.pm is never called. So you end up with a > bounce of connect until postgresql will complain. > > Well I'm going to debug it a little to see what it's happening. > > I look around using web search engine, and seems that other people has some > problem with mod_perl, mason and the DESTROY constructor and looking in the > perlobj page : > > When the last reference to an object goes away, the object is automatically > destroyed. (This may even be after you exit, if you've stored references in > global variables.) > > maybe there still some reference in a persistence connection ??? > Wow, thanks :) Well, what I think is going on there at least is the garbage collector isn't able to delete it immediately because there are circular references. Specifically, $sys holds a reference to $sys->{parameters}, which holds a reference back to $sys. I am thinking we may want to create a $sys->finished() method that does the same thing as DESTROY to alleviate these problems. I've opened a bug on this. I'll play with it and get finished() in today or tomorrow along with Mark Nickel's patch. --John |