flex内存泄露解决之道
(1)Event Listeners
Listening to parent objects does cause memory leaks
e.g.
override protected function mouseDownHandler(…):void {
systemManager.addEventListener(“mouseUp”, mouseUpHandler);
you can:
1.Removing the addEventListener (when dispose).
systemManager.removeEventListener(“mouseUp”, mouseUpHandler);
2. Use of weak reference listeners
override protected function mouseDownHandler(…):void {
systemManager.addEventListener(“mouseUp”, mouseUpHandler, false, 0, true);
These do not block garbage collection(generally do not cause memory leaks):
Weak References
Self References
References to Child Objects
weak reference event listener e.g.
&nb
相关文档:
(1)tree点击事件public function handleList(ev:ResultEvent)
{
sourceList=ev.result as ArrayCollection;
}
private function tree_itemClick(evt:ListEvent):void {
var item:Object = Tree(evt.currentTarget).selectedItem;
if (pmtree.dataDescriptor.isBranch(item)) {
......
一个数据模型就是一个ActionScript对象,这个对象的属性用来存储应用程序之地你的数据。在向服务器发送数据之前,或者从服务器接收数据但还没有使用之前,数据模型提供一个在Flex应用程序中存储数据的途径。Adobe Flex应用程序与服务器之间的通信只发生在Flex应用程序需要检索的数据尚未可用,和使用Flex应用程序中的新数据 ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
......
flex项目和组件等
open-source project : Flex
Adobe APIs
主要包含corelib, mappr, flickr, youtube及加密等类库.
http://labs.adobe.com/wiki/index.php/ActionScript_3:resources:apis:libraries
as3awss3lib
与 Amazon S3 交互的 ActionScript 3.0 类库
http://code.google.com/p/as3 ......