Hi, This is a post that I originally put on the SWIG developer's mailing list. Apparently it had been mentioned on the p5p list, and a patch exists for it. Does anyone know where this patch might be? Thanks, Dale Coder -- .-|-. Dale Coder .` | '. phone: (408) 938-6403 PDF Solutions Inc. / | \ cell: (408) 506-6938 333 W San Carlos Ste 1200 / | \ fax: (408) 280-7915 San Jose, CA 95110 ___.'PDF Solutions`.___ email: coder@pdf.com ---------------------------------+-----------------------------------
-- BEGIN included message
- From: paul@breslaw.demon.co.uk (Paul Breslaw)
- To: coder@PDF.COM
- Cc: swig@cs.uchicago.edu
- Date: Sun, 23 Jan 2000 12:49:45 +0000 (GMT)
- Message-Id: <10001231249.AA00410@ breslaw.demon.co.uk>
Dale Coder <coder@PDF.COM> said: > > Has anyone ever seen this kind of problem before? > > I've wrapped some C++ objects in Perl using SWIG, and > I then I write a loop in Perl where I repeatedly call a > another Perl subroutine. This subroutine just creates > and then immediately destroys a C++ object. > > I've noticed that the memory usage of this program grows linearly. Yes we reported this as a Perl bug (certainly in 5.004.04) in this and the p5p newsgroups some months ago. It only appears with shadowed objects. We noted some bizarre effects, eg while (<>) { my $thing = Thing->new; } leaks like a sieve, while while (1) { my $thing = Thing->new; } doesn't. One of the p5p gurus mailed me saying it was a bug in self-referential tie's, and included an experimental fix, which I subsequently lost (sorry!). You might want to pass it over the p5p list again. Regards Paul Breslaw.
-- END included message