Re: [RFA] fix ref counting of inferior_to_inferior_object

Tom Tromey
2013-09-25T20:11:58Z

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