Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Doug Evans <dje@google.com>
Cc: tromey@redhat.com, gdb@sourceware.org
Subject: Re: TYPE_NAME memory management
Date: Wed, 09 Sep 2009 17:30:00 -0000	[thread overview]
Message-ID: <8ac60eac0909091029r53400e01p985e6657522b5295@mail.gmail.com> (raw)
In-Reply-To: <e394668d0909090940t5cce8de0mb0e239b4b1549cfa@mail.gmail.com>

On Wed, Sep 9, 2009 at 9:40 AM, Doug Evans<dje@google.com> wrote:

> struct objfile_data
> {
>   unsigned index;
>   /* The objfile is about to be freed.  Save anything needed from it.  */
>   void (*save) (struct objfile *, void *);
>   /* Free all objfile-related resources held.  */
>   void (*free) (struct objfile *, void *);
> };

How about s/save/cleanup/ and s/free/destroy/:

> It would require adding a parameter to
> register_objfile_data_with_cleanup and updating all the callers.

Perhaps a new 'register_objfile_data_with_cleanup_and_destroy' function
which register_objfile_data_with_cleanup can call with NULL as the destroy
parameter?

But then there are only 4 places which call it, so not a big deal to
update them all.

-- 
Paul Pluzhnikov


  reply	other threads:[~2009-09-09 17:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04 21:18 Doug Evans
2009-09-04 22:42 ` Tom Tromey
2009-09-04 22:54   ` Doug Evans
2009-09-04 23:04     ` Joel Brobecker
2009-09-09 16:40   ` Doug Evans
2009-09-09 17:30     ` Paul Pluzhnikov [this message]
2009-09-09 17:38       ` Doug Evans
2009-09-09 17:46     ` Tom Tromey
2009-09-04 22:44 ` Joel Brobecker

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=8ac60eac0909091029r53400e01p985e6657522b5295@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=dje@google.com \
    --cc=gdb@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