I just wanted to point out that the recent change to glist_delete() (commit here) is causing crashes in libpd when closing patches.  Not sure if it is actually related, but it seems pretty similar to the bug already submitted here, which appeared a few days after the commit that I linked to.  I'll place the backtrace here, indicating that there is a stale pointer that is being accessed somewhere (this is on an EXC_BAD_ACCESS):

(gdb) bt
#0  0x00091e53 in obj_nexttraverseoutlet (lastconnect=0x7124740, destp=0xbfffd4b0, inletp=0xbfffd4b8, whichp=0xbfffd4c0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/m_obj.c:563
#1  0x00035bcd in linetraverser_next (t=0xbfffd4a0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/g_canvas.c:258
#2  0x00037caa in canvas_deletelinesforio (x=0x71230d0, text=0x7123ab0, inp=0x7123c70, outp=0x0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/g_canvas.c:788
#3  0x00047009 in canvas_rminlet (x=0x7123ab0, ip=0x7123c70) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/g_graph.c:311
#4  0x00054374 in vinlet_free (x=0x7123c00) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/g_io.c:86
#5  0x000927f2 in pd_free (x=0x7123c00) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/m_pd.c:29
#6  0x00046605 in glist_delete (x=0x7123ab0, y=0x7123c00) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/g_graph.c:122
#7  0x00037892 in canvas_free (x=0x7123ab0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/g_canvas.c:709
#8  0x000927f2 in pd_free (x=0x7123ab0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/m_pd.c:29
#9  0x00046605 in glist_delete (x=0x71230d0, y=0x7123ab0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/g_graph.c:122
#10 0x00037892 in canvas_free (x=0x71230d0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/g_canvas.c:709
#11 0x000927f2 in pd_free (x=0x71230d0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/pure-data/src/m_pd.c:29
#12 0x000bdfe7 in libpd_closefile (x=0x71230d0) at /Users/r/code/pd/Libpd/pd-for-ios/libpd/libpd_wrapper/z_libpd.c:343


Cheers,
Rich