> Yup.  That's the catch.  It'd probably need to be a bit more
> sophisticated than what I've posted OR make the apr_sms_reset a bit more
> robust (i.e. handle SMSes that have already been cleaned up).  I'm
> leaning towards making the apr_sms_reset more robust.  -- justin

yeah, well it seems to me that this would be a really smart
thing to do _anyway_.

throw an assert if someone tries to register the same
'object' twice, not just a child-sms.

is that possible?

if you have a file object, how can you check it's not the same?

... by using the cleanup function's address _and_ the void*
as the 'key'?

does that work?

that way, if it's a file object, then the file-cleanup-function
pointer is the same and oh, whoops, the file object is the
same too ASSERT.  same for handles, sockets...

... about the only exception is the null cleanup [is that used
in sms?]

luke

Reply via email to