Hello,

Anybody with experience with Swig?
Does it usually takes care on freeing unused variables?

Packages generated by Swig include a DESTROY method:

>  sub DESTROY {
>    return unless $_[0]->isa('HASH');
>    my $self = tied(%{$_[0]});
>    return unless defined $self;
>    delete $ITERATORS{$self};
>    if (exists $OWNER{$self}) {
>        Lingua::FreeLing3::Bindingsc::delete_word($self);
>        delete $OWNER{$self};
>    }
> }

But I am not able to understand this completely.
I can say that the detele_word(...) method exists, and that it seems to delete the used memory.
But not easy to understand if/when it is called.

Thanks for any hint/pointer

Cheers
ambs

Reply via email to