Skip to content

Instantly share code, notes, and snippets.

@egomez99
Created September 26, 2012 21:28
Show Gist options
  • Save egomez99/3790701 to your computer and use it in GitHub Desktop.
Save egomez99/3790701 to your computer and use it in GitHub Desktop.
Null vars: Release proxies
var navigator = require ('ui/navigator').createNavigator(),
mainWindow = require('ui/mainWindow').mainWindow();
navigator.open( mainWindow );
setTimeout(function(){
navigator.close(mainWindow);
//mainWindow = null;
//navigator = null;
}, 15000);
var stats = {
Architecture : Ti.Platform.architecture,
AvailableMemory : Ti.Platform.availableMemory,
Locale : Ti.Platform.locale,
Model : Ti.Platform.model,
OSName : Ti.Platform.name,
OSName1 : Ti.Platform.osname,
OSType : Ti.Platform.ostype,
ProcessorCount : Ti.Platform.processorCount,
Version : Ti.Platform.version,
DisplayDensity : Ti.Platform.displayCaps.density,
DisplayDpi : Ti.Platform.displayCaps.dpi,
DisplayPlatformHeight : Ti.Platform.displayCaps.platformHeight,
DisplayPlatformWidth : Ti.Platform.displayCaps.platformWidth,
TitaniumRuntime : Ti.Platform.runtime
};
var mainWindow = function(params){
var window = Ti.UI.createWindow({
backgroundColor: 'red',
id: 'mainWindow'
});
window.add(
Ti.UI.createLabel({
text: stats
})
);
window.addEventListener('close', function(){
Ti.API.info('Close event');
});
return window;
};
exports.mainWindow = mainWindow;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment