-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday, March 22, 2003, at 07:54 PM, Jason Townsend wrote:=0D
=0D
> On Friday, March 21, 2003, at 04:04 PM, Liam mac Lynne wrote:=0D
>> *** ChatWindow.m Fri Mar 21 18:56:37 2003=0D
>> - --- myChatWindow.m Fri Mar 21 19:02:52 2003=0D
>> ***************=0D
>> *** 2031,2038 ****=0D
>> }=0D
>>=0D
>> [newKey release]; // Retained by targetUser if used=0D
>> - - [msg processMessage];=0D
>> - - [msg release];=0D
>> }=0D
>>=0D
>> @end=0D
>> - --- 2031,2036 ----=0D
>=0D
> This would leak the msg object since you removed a release statement. =0D=
> Perhaps we need to change the message's state before calling =0D
> processMessage and release?=0D
=0D
The problem was that the msg object wasn't there when msg =0D
processMessage was being called; it had been prematurely released in =0D
the above if-block just above diff -c's context shown above.=0D
1) The code as-was gave an EXC_BAD_ACCESS when trying to accept the =0D
pubkey.=0D
2) Swapping the msg processMessage for the newKey release meant a crash =0D=
with SIGABRT instead; still having trouble w/ the processMessage =0D
referencing an object that no longer existed.=0D
3) Turning off the "premature" msg releases in the if-block above this =0D=
code meant that a pubkey was _displayed_ and not (in any visible =0D
manner) accepted into the GPG keyring, but stopped the deallocated =0D
object reference.=0D
4) Turning off the msg processMessage and it's assoc. msg release had =0D=
Fire properly accepting the pubkey into the keyring (so far as what =0D
Fire tells the user inline goes, at least)=0D
=0D
That's why the fix I sent in is the one giving #4. I turned off the =0D
final msg release in case it might present a deallocation problem, not =0D=
knowing exactly how that works in Obj-C. But I've been thinking, since =0D=
I sent that message, that I might well have opened a memory leak, and =0D=
was going to give MallocDebug a go & see if I could find anything out =0D=
to that effect. I think the msg processMessage definitely needs to go.=0D=
Sl=E1n,=0D
Liam=0D
=0D
- -----BEGIN GEEK CODE BLOCK-----=0D
http://www.geekcode.com/=0D
Version: 3.12=0D
GS d-- s+:-- a-- C++ U*++ P+ L+ E W++ N o? K- w---=0D
O- M++ V- PS+ PE Y+ PGP++ t+ 5+ X R++ tv-- b++ DI+ D----=0D
G e++ h--- r+++ y?=0D
- ------END GEEK CODE BLOCK------=0D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE+fk4mttNNRfIgqyIRAiK1AJ9Y3JYoG4iXHSdJnHxZ8rnLbguAlACdHw4c
75BDb5bZNpA+tsYWDStfpA8=3D
=3DjBEz
-----END PGP SIGNATURE-----
|