> -----Original Message-----
> From: vadrer [mailto:[email protected]] 
> On Sun, 2011-02-20 at 22:25 +0000, vadrer wrote:
> > 
> > Some time ago (long ago) we tried to establish a way when CODE REFs
> > created in Tcl::call would be properly refcounted, but then gave up.
> > 
> > it appears that now I found a way how it could be done in a 99.999%
> > clean way.
> > 
> > I've just commited into repo Tcl.pm on github, 
> > 
> https://github.com/gisle/tcl.pm/commit/fe4305492ee9fc845c992fa
> e13c91fa01da26cdb
> > so following piece of code behaves correctly:
> 
> 
> and now I realised that in Tcl::eval sub we could put to 
> %anon_refs hash
> just information based on __FILE__ and __LINE__ of invoked subroutine,
> just via 'caller' perl function, then CODE refcounting would be just
> fine, i.e. proper destroy of Tcl commands could be managed in time.
> 
> all the same but key to hash is caller - all should be fine.


bahhhh.

I commited new way
https://github.com/gisle/tcl.pm/commit/bff6632139940e36468c912c2e8c92e28f00a4cc

and then realized that this doesn't work correctly, due to combination of some 
reasons.

Previous method worked pretty good, however.

So i"ll revert latest change.

And until anyone complaints incompatiibiities - I am going to roll a release 
soon, and this is quite good, as
we'll have memory leaks fixed.
(or those are not qualified as memory leaks?)

Regards,
Vadim.

Reply via email to