From: Doug Evans <dje@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFA] fix ref counting of inferior_to_inferior_object
Date: Wed, 25 Sep 2013 18:18:00 -0000 [thread overview]
Message-ID: <CADPb22RMtbfhhyhv7JRngrH-y8TtOhEyfsXT3twraF42tkMg5w@mail.gmail.com> (raw)
In-Reply-To: <87hadbmfsr.fsf@fleche.redhat.com>
On Mon, Sep 23, 2013 at 1:41 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> While adding an inferior attribute to the newobjfile event,
> Doug> I noticed inferior_to_inferior_object sometimes returns (AFAICT)
> Doug> a new reference and sometimes returns a borrowed reference.
>
> The current code is maybe weird but I think it isn't incorrect. That
> said it is fine to change it as well.
>
> The current model is that the Python object mirroring the inferior
> clears the inferior->Python mapping when it is finally destroyed.
> If the Python code then requests the Python object for that inferior
> again, a new object is created. This is "ok" because the Inferior
> object doesn't carry any user state.
Doesn't the caller always need to know whether s/he is getting a new
reference or a borrowed reference?
How will s/he keep the reference count correct?
[maybe I'm misunderstanding the terms used here]
next prev parent reply other threads:[~2013-09-25 18:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 22:27 Doug Evans
2013-09-23 20:41 ` Tom Tromey
2013-09-25 18:18 ` Doug Evans [this message]
2013-09-25 18:32 ` Tom Tromey
2013-09-25 19:29 ` Doug Evans
2013-09-25 20:11 ` Tom Tromey
2013-09-25 21:11 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADPb22RMtbfhhyhv7JRngrH-y8TtOhEyfsXT3twraF42tkMg5w@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox