From: SourceForge.net <no...@so...> - 2011-04-25 22:55:36
|
Bugs item #1501284, was opened at 2006-06-05 15:27 Message generated for change (Comment added) made by szager You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1501284&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: python Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: S Joshua Swamidass (sswamida) Assigned to: Marcelo Matus (marcelomatus) Summary: OUPUT typemap --> python memory leak Initial Comment: using the output typemap with Swig 1.3.24, Python 2.4 on Linux causes a memory leak. For example, consider a swig declaration: void func(double *OUTPUT, double *OUTPUT); for the following C function: void func(double *out1,double *out2) { *out1=1324; *out2=24; } This function ca be used as expected: >>> from swigmodule import func >>> func() (1324.0, 24.0) However it produces a memory leak revealed by watching memory usage with repeated iteration: >>> while True: ... func() -----> rapidly increased memory usage. Please advise. ---------------------------------------------------------------------- >Comment By: szager (szager) Date: 2011-04-25 15:55 Message: I believe this is a characteristic of python, not SWIG. When I run this code: for i in range(10000000): i + 1 ... I get the essentially the same memory profile as with your example. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1501284&group_id=1645 |