Mercurial > dwindows
comparison mac/dw.m @ 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 |
comparison
equal
deleted
inserted
replaced
2814:1b33d03568c4 | 2815:1efe0ed76629 |
---|---|
5237 retval = DW_ERROR_GENERAL; | 5237 retval = DW_ERROR_GENERAL; |
5238 else | 5238 else |
5239 { | 5239 { |
5240 [object retain]; | 5240 [object retain]; |
5241 [object removeFromSuperview]; | 5241 [object removeFromSuperview]; |
5242 [object retain]; | |
5242 | 5243 |
5243 if(thisbox->count > 1) | 5244 if(thisbox->count > 1) |
5244 { | 5245 { |
5245 tmpitem = calloc(sizeof(Item), (thisbox->count-1)); | 5246 tmpitem = calloc(sizeof(Item), (thisbox->count-1)); |
5246 | 5247 |
5303 | 5304 |
5304 if(object) | 5305 if(object) |
5305 { | 5306 { |
5306 [object retain]; | 5307 [object retain]; |
5307 [object removeFromSuperview]; | 5308 [object removeFromSuperview]; |
5309 [object retain]; | |
5308 } | 5310 } |
5309 | 5311 |
5310 if(thisbox->count > 1) | 5312 if(thisbox->count > 1) |
5311 { | 5313 { |
5312 tmpitem = calloc(sizeof(Item), (thisbox->count-1)); | 5314 tmpitem = calloc(sizeof(Item), (thisbox->count-1)); |