RE: [gtk-list] Re: gtk-- : What's wrong with this code...?




On 03-May-98 Guillaume Laurent wrote:
> Jonathan Belson <jon@dookie.demon.co.uk> writes:
> 
>> AIUI a struct is a type of class in C++,
> 
> It is, with all members being public.
> 
>> but since there is no constructor I'd agree that calling 'new' is
>> kind of pointless 8^)
> 
> Especially since in this case you only need the pointer, with no new
> object pointed to. In your original code, you had :

<grin> I didn't think about what I'd said until after I'd posted it...you're
right, I must have frazzled my brain by sitting in front of a monitor for
too long 8^)

>         GSList *gsl = new GSList
>        [...]  
>         gsl = render_type1->group();
> 
> So not only don't you need to call new, but calling it causes a
> leak. :-)
> 
>> Maybe there's something wrong with my installation?  I'm using gtkmm 0.9.1
>> and gtk 1.0.0.
> 
> Same gtk here, but my gtk-- comes from the CVS server so it's likely a
> bit in advance on yours. Still, the best thing you can do is to email
> me your code (or preferably the smallest possible subset which
> reproduces the bug :-) so I can test it on my setup.

Thanks, I'll do that .

C-YA
Jon

http://www.dookie.demon.co.uk



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