Bug 27253 - Memory consumption constantly increasing
Summary: Memory consumption constantly increasing
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.20.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL: http://forums.xamarin.com/discussion/...
Depends on:
Reported: 2015-02-20 09:35 UTC by Narcís Calvet
Modified: 2015-02-23 04:56 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Xamarin Profiler screen-shot showing the memory consumption increasing (87.57 KB, image/jpeg)
2015-02-20 09:35 UTC, Narcís Calvet

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Narcís Calvet 2015-02-20 09:35:35 UTC
Created attachment 9945 [details]
Xamarin Profiler screen-shot showing the memory consumption increasing

I have observed that using a custom View object, which overrides the OnDraw event, increases application's memory consumption upon each Invalidate() call. This can be reproduced with the project at the "Test Case URL" field. It uses a custom View which does some custom drawing in the OnDraw event. Every time the button is pressed Invalidate() is called for the custom View and the memory consumption increases as can be seen in the Profiler screen-shot attached. Every step in the Allocations chart represents a call to Invalidate(). We have made the same test in Java but have found the memory leak is not present there with Android Studio memory monitor.
Comment 1 Stephen Shaw 2015-02-20 17:42:32 UTC
This is actually an issue with the profiler. It is currently showing the overall allocations since the start of the app and not how much memory is currently allocated at a given point in time.

This has been fixed in the profiler.
Comment 4 Udham Singh 2015-02-23 04:54:50 UTC
Thanks Narcís for the confirmation.

As per comment 3, this issue has been fixed. Hence I am closing this issue.