memory leaks around Application::PostUserEvent

Caolán McNamara caolanm at redhat.com
Mon Mar 14 12:01:04 UTC 2016


On Sat, 2016-03-12 at 17:28 +0100, Markus Mohrhard wrote:
> Hey,
> 
> so while looking through the calc memory leaks I have many leaks
> related to the return object of Application::PostUserEvent. The
> returned value is created with new but I see no clear ownership for
> the returned value.
> 
> Does anyone known who should actually own that object? It seems to be
> passed around a lot and there is the RemoveUserEvent function but I
> did not see any code that actually deletes the object.

The ImplSVEvent goes into the various platform event queues. When all
goes well it eventually gets dispatched back into the platform
independent code and ends up in ImplHandleUserEvent where it gets
deleted.

The SalGenericDisplay will delete ImplSVEvents which *didn't* get
dispatched in SalGenericDisplay::deregisterFrame.

So presumably your leak doesn't hit either getting dispatched and thus
deleted, or detected during some teardown case as an undispatched event
and deleted by the platform-dependent event queue handler.

C.


More information about the LibreOffice mailing list