[PD-dev] [pure-data:bugs] #1149 memory leak in libpd_openfile

Ticket 1149 via Pd-dev pd-dev at lists.iem.at
Sat Jun 28 23:31:05 CEST 2014




---

** [bugs:#1149] memory leak in libpd_openfile**

**Status:** open
**Group:** v0.43
**Labels:** memory leak libpd_openfile 
**Created:** Sat Jun 28, 2014 09:31 PM UTC by Anonymous
**Last Updated:** Sat Jun 28, 2014 09:31 PM UTC
**Owner:** nobody

Hello, I am making an iOS app with libpd 0.43.4.  My app is basically a copy of the SlidePad iOS app and this "openPatchesNamed" method is lifted straight from the sample:

~~~~~~
- (void)openPatchesNamed: (NSString *)name path: (NSString *)path instances: (int)numInstances
{
  self.patchName = name;
  for (int i = 0; i < numInstances; i++)
  {
    [self.patches addObject: [PdFile openFileNamed: name path: path]];
  }
}
~~~~~~

When I run the app in Apple's Instruments I see many memory leaks in libpd_openfile and libpd_close file.  I've attached two screen shots which show these leaks.

For closefile, glist_delete makes calls to rtext_new which allocates memory which is never freed.

I have not debugged the openfile leak but the screen shot shows the stack trace.

My environment os OSX 10.9.3, xcode 5.1.1, on a MacBookPro

Thanks!

Allan Hoeltje




---

Sent from sourceforge.net because pd-dev at lists.iem.at is subscribed to http://sourceforge.net/p/pure-data/bugs/

To unsubscribe from further messages, a project admin can change settings at http://sourceforge.net/p/pure-data/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20140628/e888d2f9/attachment.html>


More information about the Pd-dev mailing list