Re: [Re: [Re: gobject weak references]]



On 18 Sep 2001, Murray Cumming wrote:

> Alex Larsson <alexl redhat com> wrote:
> > On 18 Sep 2001, Murray Cumming wrote:
> > 
> > > Oh, OK, if the memory hasn't been freed yet then I have no problem with using
> > > the pointer.
> > 
> > In what way does it matter if it has been freed or not?
> 
> I wouldn't like an API to encourage the use of invalid pointers because that
> increases the chance of segfaults.

The pointer is not invalid. It just points to invalid memory. And it is 
called where_the_object_was for exactly this reason.

Adding all sorts of bloat to disallow perfectly ok code seems really bad.

/ Alex





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]