On Fri, Feb 24, 2006 at 11:52:35PM +0800, Orlando Andico wrote: > > "undef $soap_obj" for every 100 calls? or move > > "my $soap_obj = SOAP::Lite->new" inside a func() so that after each > > invocation of func(), $soap_obj goes out of scope and thus gets > > destroyed? > > I am already doing all that. Actually it's my SOAP::Data object which is > very large. However, I just tried injecting raw XML into the SOAP::Data > object, this did not help at all, so I think it's the overhead of > XML::Parser when it deserializes the return values which is hurting.
Perhaps the object is not garbage collected because another is holding reference to it or vice versa. Examine it's reference count with Devel::Peek. If it's greater than one, try to recurse down the data structure and delete (delete(), undef, ()) all the references. FROM `perldoc perlguts`: Reference Counts and Mortality Perl uses a reference count-driven garbage collection mechanism. SVs, AVs, or HVs (xV for short in the following) start their life with a reference count of 1. If the reference count of an xV ever drops to 0, then it will be destroyed and its memory made available for reuse. This normally doesn't happen at the Perl level unless a variable is undef'ed or the last variable holding a reference to it is changed or overwritten. HTH -- $_=q:; # SHERWIN # 70;72;69;6e;74;20; 27;4a;75;73;74;20; 61;6e;6f;74;68;65; 72;20;50;65;72;6c; 20;6e;6f;76;69;63; 65;27;:;;s=~?(..); ?=pack q$C$,hex$1; ;;;=egg;;;;eval;;; _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

