Good morning,

On 21-Sep-06, at 6:25 AM, Marius Feraru wrote:

> Dominic Mitchell wrote:
>> We are passing these objects as arguments into components.
>>    <& "/some/component", search => $myobj &>
>>
>> I've recently upgraded one of our sites from Mason 1.28 to 1.33 and
>> discovered that these objects are not getting destroyed properly.  I
>> added some logging to the destructor and it was not being  
>> terminated at
>> the correct point.  Instead of going out of scope at the end of the
>> component which created the object, it's being destroyed at the  
>> end of
>> the request (or not all in some cases, which I don't understand).
>
> I remember I had this problem long time ago, but I what I don't really
> remember is how I solved it.

Ditto.

[...]

> By baking simple test cases I often found out that in fact there were
> "my bugs" instead "mason bugs". Let's hope you'll get to the same
> conclusion, for the sake of all masonites ;-)

As far as I can tell, even with current Masons, this is still an  
issue for the test case I outlined in this thread:

http://sourceforge.net/mailarchive/message.php?msg_id=11948234

I found it particularly occurs within sight of component-with-content  
calls.

I also eventually tracked it down to a stack issue, and submitted a  
partial patch, but I don't think it was ever looked at or integrated  
in any way. Also the way that Mason handles its component stacks  
changed right around that time; I found it didn't make my use-case go  
away, but my patch was no longer valid IIRC (it was a while ago).

In many cases I could avoid the issue by a combination of:

1. not using (or differently using/ordering) my component-with- 
content calls
2. using "weaken" at the "right spots"
3. adding a specific call to the DESTROY functionality that I could  
manually call at the "right time"


Cheers,


-Michael
_______________________________________________________

Michael Burns
Cosbit Technologies
403-701-2672  / [EMAIL PROTECTED]

GTalk: cmikeburns
AIM: cmikeburns
MSN: cmikeburns
_______________________________________________________

Box 2173, Station M  •  Calgary, Alberta, Canada  •  T2P 2M4
http://cosbit.com




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to