Re: possible g_hash_table mem leak?

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

 



[...]
> > Your problem is probably that you are combining asprintf() with g_free(),
> > using g_strdup_printf should give you better results.
> >
> 
> I rewrote the code using:
> a = g_strdup_printf("a");
> 
> And have absolutely the same result!

Hmmm, maybe you found a leak;

Why dont you try running valgrind with `--num-callers=20', then
we can see who was responsable for allocating those 1076 bytes :)

Also, maybe its something like:

if (my_bytes == NULL) 
    my_bytes = alloc_once_in_program_life_time (1076);

If you do the operation twice (create/insert/delete hash table) before
exiting, do you leak 2152 bytes ?

Cheers,
                                                   -Tristan
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux