nemomobile/nemo-qml-plugin-social — pull request #18 by SfietKonstantin (2013-06-04 13:22:47+00:00)
Title: Small redesign of filter and sorter ownership management

Filters and sorters are instantiated in a QML context, while
used inside the C++ one. They were attached to the SNI if they
didn't had parent, that could fix memory leaks. However, the
main problem is when filters or sorters are created in QML, and
destroyed.

A simple example is when some filters are created inside a QML
Page, and when that page got poped out of the page stack without
informing the SNI. The SNI might continue using the filters
even if they are already destroyed (their parents were the page,
and while being poped out, the page is destroyed). This situation
leads to segmentation faults.

In this commit, all filters and sorters that are attached to the SNI
are connected to a slot that remove them from the filter and sorter list
if they are destroyed.