Patch for mismatched free() / delete / delete[]

7 views
Skip to first unread message

Young-Jin Seo

unread,
Feb 19, 2013, 11:39:04 AM2/19/13
to msgpa...@googlegroups.com
duedal made a patch for "mismatched free() / delete / delete[]"
After that, I got a problem that memory is not freed till program exit.
That is from this line.

234  
-    result->zone().reset( release_zone() );
  234
+    if (result->zone().get() != NULL) result->zone().reset( release_zone() );


In most of case result->zone.get() is NULL, so release_zone() will not be called until zone::~zone().
Anyway, I made rough patch, Please review attached patch.

--
Seo Youngjin
msgpack_zone.patch

Young-Jin Seo

unread,
Feb 19, 2013, 1:50:11 PM2/19/13
to msgpa...@googlegroups.com
Please ignore my previous mail.
I think following line has still problem but my patch is totally meaningless.
Sorry for my bothering you.



234  
-    result->zone().reset( release_zone() );
  234
+    if (result->zone().get() != NULL) result->zone().reset( release_zone() );



--
Seo Youngjin
Reply all
Reply to author
Forward
0 new messages