This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] fix ref counting of inferior_to_inferior_object
- From: Tom Tromey <tromey at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 25 Sep 2013 14:11:53 -0600
- Subject: Re: [RFA] fix ref counting of inferior_to_inferior_object
- Authentication-results: sourceware.org; auth=none
- References: <yjt2zjrhekva dot fsf at ruffy dot mtv dot corp dot google dot com> <87hadbmfsr dot fsf at fleche dot redhat dot com> <CADPb22RMtbfhhyhv7JRngrH-y8TtOhEyfsXT3twraF42tkMg5w at mail dot gmail dot com> <87ob7giwgd dot fsf at fleche dot redhat dot com> <CADPb22QwB7MYkVZCiYijnq7QdJHcjNhkvxbDm5K4FJxMdv3ghw at mail dot gmail dot com>
Doug> Not that you disagree or anything, but IWBN to remove whim from
Doug> the equation. Consistency Is Good, and all that.
I'm not so sure. I think consistency is one good among many, and there
is a cost to enforcing these sorts of rules.
This is particularly true if the code is already not consistent. Unless
maybe you are volunteering to change it all.
Doug> If we're going to store a pointer to the Python object in a gdb
Doug> registry, why not have a convention that gdb owns a reference?
Doug> [could be missing something of course]
I don't think I have an example offhand. I suppose it is potentially a
problem in a case where there are many such objects and we don't want to
retain them all. But those cases are probably rare, maybe non-existent
in the current code. So maybe it is ok.
Tom