/js/lib/Socket.IO-node/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Memory.as
ActionScript | 28 lines | 17 code | 1 blank | 10 comment | 0 complexity | a83b600438e19b8c007c2d1d0ede8f1e MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
- /**
- * Memory
- *
- * A class with a few memory-management methods, as much as
- * such a thing exists in a Flash player.
- * Copyright (c) 2007 Henri Torgemane
- *
- * See LICENSE.txt for full license information.
- */
- package com.hurlant.util
- {
- import flash.net.LocalConnection;
- import flash.system.System;
-
- public class Memory
- {
- public static function gc():void {
- // force a GC
- try {
- new LocalConnection().connect('foo');
- new LocalConnection().connect('foo');
- } catch (e:*) {}
- }
- public static function get used():uint {
- return System.totalMemory;
- }
- }
- }