changeset 2815:1efe0ed76629

Mac: Fixed a longstanding crash I had on exit in dwtest on PPC MacOS. I don't really understand why, but I need two retains in the box unpack functions or the unpacked widget will be double deallocated when draining the auto release pool on application exit. The zombie detection code on Intel reported the problem as well, but it did not actually crash.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 01 Aug 2022 22:09:46 +0000
parents 1b33d03568c4
children 4521f014bb17
files mac/dw.m
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Mon Aug 01 16:55:06 2022 +0000
+++ b/mac/dw.m	Mon Aug 01 22:09:46 2022 +0000
@@ -5239,6 +5239,7 @@
             {
                 [object retain];
                 [object removeFromSuperview];
+                [object retain];
 
                 if(thisbox->count > 1)
                 {
@@ -5305,6 +5306,7 @@
             {
                 [object retain];
                 [object removeFromSuperview];
+                [object retain];
             }
 
             if(thisbox->count > 1)