Re: [gtk-list] Scope question




On Fri, 7 May 1999, pavel wrote:
> 
> When a callback is called and (GdkEvent *event) is passed to it, 
> what happens to *event after the callback done. Is it destroyed or can I
> meaningfully say (static GdkEvent *lastEvent = event)?
> 

I'm pretty sure it's destroyed, however you could say:

static GdkEvent event = *event;

just don't refer to event->window or other pointer members unless you're
sure they are still valid.

Havoc




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