Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19638] Memory Leak in Alloy android Menu?

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsalloy, android, leak, memory, menu
ReporterAndrey Tkachenko
AssigneeUnknown
Created2015-09-05T19:41:31.000+0000
Updated2018-02-28T19:55:49.000+0000

Description

I test my code for memory leaks. When I use Menu in my View I can't to make sure that memory fully released. Not all proxy removed from memory after closing test window. Some time but rarely all proxies and his native views removed fully. Why it happens and how to deal with this behavior? The situation is complicated by using a more complex controller with a many of child Views.
<Alloy>
    <Window>       
        <Menu id="menu" platform="android">           
            <MenuItem id="submitButton" title="123">
            </MenuItem>
        </Menu>    
        <Label>Close this window and then create second HPROF dump. Then compare difference against two dumps.</Label>    
    </Window>
</Alloy>
// empty
function doClick(e) {
    Alloy.createController('testWindow').getView().open();
}

$.index.open();
<Alloy>
	<Window class="container" layout="vertical">
	    <Label>Create first HPROF dump now</Label>
		<Button id="label" onClick="doClick">Click to open test window</Button>
	</Window>
</Alloy>
!dumps.png|thumbnail!

Attachments

FileDateSize
1st Dump.png2015-09-07T09:27:39.000+0000147694
2nd Dump.png2015-09-07T09:27:36.000+0000146141
dumps.png2015-09-05T19:43:46.000+0000108954

Comments

No comments

JSON Source