[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reentrancy in dispose
From: |
John Darrington |
Subject: |
Reentrancy in dispose |
Date: |
Mon, 16 Jul 2012 14:21:06 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
I'm not convinced that some of the dispose routines that we have are
very reliable at catching reentrancy.
if (thing->obj != NULL)
g_object_unref (thing->obj);
thing->obj = NULL;
The problem is that g_object_unref can cause its argument's dispose
routine to run. Which in turn, could unref a reference it holds on
us, and hence run our dispose routine. Since we haven't yet set thing->obj
to NULL, it will call g_object_unref on it again.
Have I analysed this correctly?
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature
- Reentrancy in dispose,
John Darrington <=