|Subject||Re: [IB-Architect] New API: Object Life Time|
|Author||Marcelo Lopez Ruiz|
> A parent object, when deleted, takes its children with it. Releasingconnection.
> a PreparedStatement would automatically delete all ResultSets. Releasing
> a Connection object would delete everything associated with the
Hmm... Does this mean that I can't have a reference to the child ResultSet
without knowledge of parent Connection object?
If a child ResultSet has a reference count greater than zero, then it can't
be deleted, because it means someone else has a reference to it. If the
memory is freed, you'd get an AV when the code that had a reference to it
tried to call a function on it - or maybe not, which would be worse ;-)
This would not be a lot of fun to debug in, say, a multithreaded program.
Or am I not understanding the reference count mechanism correctly?
Marcelo Lopez Ruiz