You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/01/20 07:52:07 UTC
[3/4] git commit: [flex-utilities] [refs/heads/develop] - free up
memory as we go. Really big zip files were using up all memory
free up memory as we go. Really big zip files were using up all memory
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/0e4fc0af
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/0e4fc0af
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/0e4fc0af
Branch: refs/heads/develop
Commit: 0e4fc0af788ebf99633f5e7f7442735cd78e6822
Parents: 759e5a8
Author: Alex Harui <ah...@apache.org>
Authored: Mon Jan 20 06:48:32 2014 +0000
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Jan 20 06:48:32 2014 +0000
----------------------------------------------------------------------
ant_on_air/src/org/apache/flex/ant/tags/Get.as | 3 +++
ant_on_air/src/org/apache/flex/ant/tags/Unzip.as | 3 +++
2 files changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/0e4fc0af/ant_on_air/src/org/apache/flex/ant/tags/Get.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Get.as b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
index c16aca9..6e679fa 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Get.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
@@ -150,6 +150,7 @@ package org.apache.flex.ant.tags
ant.project.status = false;
dispatchEvent(new Event(Event.COMPLETE));
event.preventDefault();
+ urlLoader = null;
}
private function securityErrorHandler(event:SecurityErrorEvent):void
@@ -158,6 +159,7 @@ package org.apache.flex.ant.tags
ant.project.status = false;
dispatchEvent(new Event(Event.COMPLETE));
event.preventDefault();
+ urlLoader = null;
}
private function progressHandler(event:ProgressEvent):void
@@ -177,6 +179,7 @@ package org.apache.flex.ant.tags
fs.close();
}
dispatchEvent(new Event(Event.COMPLETE));
+ urlLoader = null;
}
private function getDestFile():File
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/0e4fc0af/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
index fa1ce33..b0969b0 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
@@ -170,6 +170,9 @@ package org.apache.flex.ant.tags
fs.open(f, FileMode.WRITE);
fs.writeBytes(fzf.content);
fs.close();
+
+ // attempt to shrink bytearray so memory doesn't store every uncompressed byte
+ fzf.setContent(null, false);
} catch (error:Error) {
ant.output(error.message);