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
Ïà¹ØÎĵµ£º
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
......
¼òµ¥½éÉÜÐÅFlexÓëWeb·þÎñµÄ½»»¥
Ö÷ÒªÄÚÈÝ:
1.ActionScriptÓë·þÎñ¶ËµÄ»ù±¾½»»¥·½Ê½(REST).
2.ActionScriptÌØÓеÄÊý¾Ý´«Êä¸ñʽ(AMF)Óë·þÎñÆ÷½»»¥.
3.FlexÓëWebService.
ҪʵÏÖActionScriptÓë· ......
Ò»¸öÊý¾ÝÄ£Ð;ÍÊÇÒ»¸öActionScript¶ÔÏó£¬Õâ¸ö¶ÔÏóµÄÊôÐÔÓÃÀ´´æ´¢Ó¦ÓóÌÐòÖ®µØÄãµÄÊý¾Ý¡£ÔÚÏò·þÎñÆ÷·¢ËÍÊý¾Ý֮ǰ£¬»òÕß´Ó·þÎñÆ÷½ÓÊÕÊý¾Ýµ«»¹Ã»ÓÐʹÓÃ֮ǰ£¬Êý¾ÝÄ£ÐÍÌṩһ¸öÔÚFlexÓ¦ÓóÌÐòÖд洢Êý¾ÝµÄ;¾¶¡£Adobe FlexÓ¦ÓóÌÐòÓë·þÎñÆ÷Ö®¼äµÄͨÐÅÖ»·¢ÉúÔÚFlexÓ¦ÓóÌÐòÐèÒª¼ìË÷µÄÊý¾ÝÉÐδ¿ÉÓ㬺ÍʹÓÃFlexÓ¦ÓóÌÐòÖеÄÐÂÊý¾Ý ......
1.µ±ÏÂÔØÁËflash builder 4 beta £¬°²×°Æô¶¯Ê±ºò£¬»ØÌáʾÊäÈë×¢²áÂë¡£¿Éͨ¹ýÍøÖ·https://freeriatools.adobe.com/flashbuilder4beta/ ÊäÈëFlex Builder 3 Serial #: À´»»È¡ builder 4 betaµÄ×¢²áÂë¡£ÔÚÓʼþÖвéÊÕ
2.ͨ¹ýhttp://www.adobe.com/devnet/flex/videotraining/flex4beta/À´Ñ§Ï°flex4.¸öÈ˸оõvideo×öµÄºÜ²» ......
SWFÖ®¼äͨÐÅ¡¢FlexÓëSWFÖ®¼äͨÐÅ¡¢C#ÓëSWFÖ®¼äͨÐÅ
Ò»¡¢SWFÖ®¼äͨÐÅ£¨¸÷SWFÎļþ¾ùûÓаüº¬¹ØÏµ——·ÇÄÚ²¿Ç¶Èë¼ÓÔØ£¬¾ù¶ÀÁ¢£©
ʹÓà LocalConnection Àà¿ÉÒÔ´´½¨Ò»¸ö LocalConnection ¶ÔÏ󣬸öÔÏó¿ÉÔÚÒ»¸ö SWF ÎļþÖлò¶à¸ö SWF Îļþ¼ä£¬µ÷ÓÃÁíÒ»¸ö LocalConnection ¶ÔÏóÖеķ½·¨¡£ ͨ¹ý±¾µØÁ¬½Ó£¬¿ÉÒÔÔÚ SWF ......