Re: [PATCH] Fixed some Crashes, a memory leak and some minor issues



Hi Andreas

On 2014-05-24 02:47, Andreas Winkelmann <ml awinkelmann de> wrote:
The cause were the interaction between the Lists for the Albums and
Artists and the Pointers to them stored in the List Stores. Actually
these lists get freed but not removed from the List Stores. So there
were some dangling pointers around. Which were accessed with some gtk
row-changed signals.

While digging in these places to find the reason for my crashes I found
a memory leak. The Lists added to the "<All Albums>" Rows were not
free()'d. Also fixed with the attached patch.

Furthermore some minor issues.

I am travelling at the moment, so I will probably not be able to look at the patch this week, but could you split up the patch into one per problem, so that it is easier to review?

There seem to be some whitespace changes, which should be removed.

I do not think that the g_object_unref() changes are correct, as a GtkListStore inherits from GObject, not GtkWidget (and, more importantly, does not inherit from GInitiallyUnowned). Therefore, it starts with a reference count of 1, which is increased by 1 when adding it to a GtkTreeView. The result of this is that when destroying the tree views, the models will not be finalized.

Thanks for your investigation, and the patch!

--
http://amigadave.com/

Attachment: signature.asc
Description: Digital signature



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