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

Re: webkit-1.8.0-2: Patches for review



Svante Signell, le Mon 16 Apr 2012 18:07:54 +0200, a écrit :
> No, doesn't look like it (from the ChangeLog):

Ok.

> > > Problem with the patch is that the allocated string cannot easily be
> > > freed:
> > 
> > You mean the string allocated in getCurrentExecutablePath()?  It's fine
> > to keep it allocated all the time. Just make sure to store the pointer
> > in a static variable, to be able to reuse the buffer next time the
> > function is called.
> 
> Adding static to the CString definition or adding static when
> allocating, like: static CString path = getCurrentExecutablePath();

No, I mean *inside* getCurrentExecutablePath. There used to be a static
PATH_MAX char array; make it a static char * that gets reused each time.

Samuel


Reply to: