ActionScript 2.0 :: Memory Leaks In Loading / Unloading Pictures

Nov 15, 2011

I load image from url like this
Code:
imageholder = this.attachMovie("imageholder", "image", this.getNextHighestDepth());
imageholder.swapDepths(selectMenu);
loader.loadClip(uri, imageholder.bigImage_mc);
this== root, imageholder is MC that contains empty MC named bigImage_mc, selectMenu needs to be in front of loaded image (2nd line) and loader is MovieClipLoader()

Image is unloaded and removed like this
Code:
loader.unloadClip(imageholder.bigImage_mc);
imageholder.swapDepths(selectMenu);
removeMovieClip(imageholder);
but when I unload image it doesn't free any memory, and when i load new image it increase memory usage...

I even tried
Code:
System.gc();
System.gc();
after removeMovieClip(); as I found this on some website... but with no improvement

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Loading / Unloading External SWF - Prevent Memory Leaks

Sep 19, 2011

Im creating a flash projector which has a holder swf with an empty movieclip. A series of external SWFs are loaded into the empty movieclip on the push of a button. Once the clip has been loaded, other external SWFs can be replaced in the empty movieclip at the push of a button. As memory leaks and garbage collection seem to be an issue, I was wondering the most memory efficient way of loading, unloading and replacing these external swfs so that memory leaks are kept to an absolute minimum.

View 1 Replies

ActionScript 2.0 :: Memory Leaks When Loading In External Swfs

Dec 8, 2009

I have a problem in that i have a holder swf which loads in other swf's externally. My problem is that the holder loads all the movies in correctly but the memory usage of the swf just keeps going up and up even though i am trying to remove the movieclip after each has finished it's run.

[Code]..

View 0 Replies

ActionScript 3.0 :: Memory Keeps Growing From Loading Unloading A Simple Swf?

Feb 5, 2011

My Problem: I simply want to load a swf in a swf and then unload it. When I do this it works and cleans out "some" memory but after I unload the swf the memory usage grows a little each time. Shouldn't I be able to have this so the memory hits a limit and doesn't keep growing forever?

What I tried: I put in System.gc() for debugging to force garbage clean up, and I am testing it in the debugger in the browser.There are 2 static images in the swf that is loaded and unloaded. I feel like those images are staying in memory maybe? I am assuming that the "unloadAndStop()" should handle that though.I put an enterframe listener which I remove along with the unload button.

My Code: The code is below, my files are larger than the upload limit here, but you can download all the files from this link: http:[url]....

Main swf to load into:

Code:
var _swfLoader:Loader;
var _swfContent:MovieClip;[code]............

View 4 Replies

ActionScript 3.0 :: Identifying Memory Leaks?

Feb 23, 2007

I have an AS3 application which seems to be leaking memory slowly while running. I've been looking for a profiler for Flex 2 / AS3 and haven't been able to find one yet, in fact I saw posts from people at Adobe saying they were working on it but no release in the short term!

Does anyone have any more news on this, or more usefully have any information on a profiler or other way it is possible to find memory allocation and usage during runtime of an AS3 application? It would really help me to identify what areas of my application are leaking memory.

View 4 Replies

Flex :: Spot Memory Leaks In Profiler?

Jul 20, 2009

I have an AIR/Flex app I made, I have a few people testing it and everyone is reporting that after leaving it running for a while, it is making all there machines run very slow. It runs fine at first so this must be a memory leak somewhere. I used the profiler on this and the only thing that shows as using a substantial amount of memory is MethodQueueElement which is not a class I wrote, and I have no idea what it does, I am assuming its part of the Flex framework. I am not familiar with using a profiler so I am not sure what all I shuld be looking at, that was the only class that was high on "memory" and it said it had over 100,000 instances. If this is my problem what can I do to fix it?

View 1 Replies

Flex :: Detect Memory Leaks In Flash?

Feb 11, 2010

How do you know if your compiled SWF file has a memory leak?

Are there tools, a firebug setting, etc... to see if there is a problem? I cannot find much in the debug Flash player besides file size and loading time.

I have a large Flash application that I maintain and suspect that is using way too much memory so I wanted to measure the amount of RAM being used while it executes to find key areas to optimize.

View 3 Replies

Flex :: Track Down Memory Leaks In The Application?

Feb 14, 2011

I've been trying to track down memory leaks in our application, and keep finding myself back looking at Spark components as the culprit.

Many classes in Spark use RichEditableText for displaying their text properties (ComboBox,TextInput).RichEditableText has a local textContainerManager property, and frequently calls compose() on this.Here's the relevant abridged extract from TextContainerManager

// Line 282 - 292:
static private var stringFactoryDictionary:Dictionary = new Dictionary(true);
static private function inputManagerStringFactory(config:IConfiguration):StringTextLineFactory
{

[code]...

Line 1242 is the crucial line here, as it gives the static dictionary a reference to our component.(Note - I've checked this with the debugger to confirm which branch of the ternary gets executed.) This would prevent the instance from ever being garbage collected.

Eg: Static dictionary has a value with a reference to the instance -- instance cannot be GC'd.In turn, this would prevent any other instances which have a reference to the instance of TextContainerManager from being GC'd also.While this theory certainly matches what I'm seeing in our app, I can't beleive that there really is a memory leak in such a low-level spark component.

View 1 Replies

Flex :: Cairgrom ModuleLoader Memory Leaks?

Mar 23, 2012

I also found this topic but it doesn't fix my problem other topicI have a module loader that load other swc's but when I look at the memory off the application it seems that each time a module gets loaded the previous module doesn't get unloaded and so the memory increases..

This is how I load the modules:
<module:ModuleViewLoader id="moduleViewLoader" moduleManager="{presenter.deviceModuleManager}"

[code].....

View 1 Replies

ActionScript 3.0 :: Memory Leaks Eventlisteners And New Sounds?

Oct 13, 2010

Memory leaks eventlisteners and new sounds. I have written up a media player code, which does what it is supposed to do, but the System.totalMemory steadily increases with time.My code essentially consists of nested calls using EvenListeners that trigger initiation of new sounds. I call up mp3 files that load and start play and on EventCOMPLETE load the next file Example of code snippet:

ActionScript Code:

function LoadNextTheme(e:Event = null):void // set next theme
{
if (A_play)  {

[code]....

What parts of this kind of code keeps adding to total system memory?And how can I best stop that leak?

View 1 Replies

ActionScript 3.0 :: Unexplainable String Memory Leaks?

Dec 23, 2010

I developed a game in AS2, and got a decent sponsorship deal, but I had to convert it to AS3 for them. I've been working my way through and it's pretty much done, but I've found I'm getting big memory leaks. I'm not sure if they were there in the AS2 version, but I need to clear them out in either case. I couldnt get the flex/flash builder 4 profiler to work, but I did manage to get this profiler working: (ok I can't post links, but put flashpreloadprofiler into google and you'll find it)

It does seem useful for working out where all the memory is being allocated. It lists "String" as a large contributing factor, and I've narrowed half of that down to this one simple function, and I can't understand why it would cause memory leaks. I wrote a function to check if a movieclip exists on stage, in order to then do things like hittest against it without errors if it doesn't exist. Here's the function:

[Code]...

View 3 Replies

ActionScript 3.0 :: Memory Leaks Eventlisteners And New Sounds

Oct 13, 2010

Memory leaks eventlisteners and new sounds.I have written up a media player code, which does what it is supposed to do, but the System.totalMemory steadily increases with time.My code essentially consists of nested calls using EvenListeners that trigger initiation of new sounds. I call up mp3 files that load and start play and on EventCOMPLETE load the next file.[code]What parts of this kind of code keeps adding to total systemmemory?

View 3 Replies

ActionScript 3.0 :: Garbage Collecting - Make Sure There Are No Memory Leaks?

Feb 9, 2010

What's necessary to do when removing an object to make sure there are no memory leaks? Do you have to remove all children? Or just remove all event listeners? Or both?

View 1 Replies

ActionScript 3.0 :: Memory Leaks - Variable Reference Inside A Function Or Outside It?

Mar 11, 2009

I wonder what the most common reasons for memory leaks in AS3 are.First thing what I am not sure about is: is it better to have a variable reference inside a function or outside it. Will the variable be null-d automaticly inside a function or when do I have to null it and when not?I have massive problems with my game with memory leaks. I noticed I reference some of the clips of the timeline even inside my debugging clip to display propertys and this was causing collecting huge amount of memory.But even before I go into the game with bigger objects the System.memory is slowly growing and growing.I just have a socket connection and some interval loops and enter_frame events.

View 5 Replies

ActionScript 3.0 :: Unloading Images From Memory?

Jan 31, 2011

I want to make this VERY SIMPLE image gallery, and i'm just using this code:

var i =new Loader();
i.load(new URLRequest("imagens/1.jpg"));
galeria.addChild(i)

I change images just with a button that tells to go to a different keyframe with a new code, like this:

i.load(new URLRequest("imagens/2.jpg"));
galeria.addChild(i)
i.load(new URLRequest("imagens/3.jpg"));
galeria.addChild(i)

The problem is... when I check the Task Manager the memory usage of the Flash player keeps going up and up without reducing everytime I click the "Next image" or "Previous Image" buttons. Even when loading the same image.I tryed many things to "unload" the image from the memory but none of them worked...

View 1 Replies

ActionScript 3.0 :: Unloading FLV Memory - Limit Of 3 Videos

Aug 24, 2009

I am having some trouble with the FLVPlayback component with regards to memory. The videos are being loaded in from a server in quick succession. The user has the ability to go from video to video, but its not all in one FLV Playback, each new video has its own FLV Playback on the stage. I tried to manage memory by setting a limit of 3 videos and eliminating any extra instances. I've tried stopping the video, and I've tried closeVideoPlayer(1);. While examining System.memory, I noticed it just keeps stacking up with every new video that's loaded in. The memory usage is not going down when I stop the video and remove the instance!

View 2 Replies

Unloading External Swf File Keeps Memory Usage Growing Up?

Dec 7, 2009

The idea is very simple: I have a submain.swf with 5 buttons. Each button loads an external .swf loader.load(URLRequest);After playing first external swf, before I go to next one, I try to unload it1. remove all its associated listeners:com_loader.contentLoaderInfo.removeEventListener(Event.INIT-PROGRESS-C OMPLETE, idFunction);2. unload it:

View 3 Replies

ActionScript 3.0 :: Loading And Unloading SWF

Feb 5, 2011

I was wondering if someone could take a look at my files and tell me what I'm doing wrong. I'm trying to rebuild an ad in AS3 from AS2 and I'm running into some issues. This is the problem: When a page loads there is a 728x360 container that loads a 728x90 ad. What I need to happen is I need to communicate to the container that when the 728x90 expand button is clicked it needs to unload or stay on the screen while a 728x360 expanded state is loaded in.

I have these files 90% figured out. My problem is I cant get the collapsed state that is loaded into the container to load the new state. I've included my files and they re really simple to follow.

View 0 Replies

ActionScript 3.0 :: Loading And Unloading SWF's?

Feb 1, 2012

I've got a games menu and have the code to load games when a button is clicked. So far say you want to play GameA... The player clicks the button to Play GameA and that game is loaded. Once the player finishes the game they are shown a button to continue which unloads the game and loads the menu.

The problem is that I want a movieclip to be visible on the menu but only when GameA is completed. There is no way to back out of GameA and getting back to the menu without completing GameA. I don't know how in GameA to put that if the continue button is pressed make 'GameATick' visible. I've tried inside the code of GameA putting code like root.GameATick.visible and code like this but it doesn't recognise the MC.

View 4 Replies

IDE :: Loading, Unloading Swf Through Button?

Sep 24, 2009

i have looked for a solution for a long time but they either didnt work and were too complicated for my little skill. so i have a main .swf which im working on. i then have buttons which when clicked, launch a panorama. the problem is that this panorama is created with a 3rd party program and is a .swf. now. i curretly have the follwoing script to launch the panorama

on(release){
loadMovieNum ("foyer_pano.swf", _root)
}

however this opens the swf in a new tab of my web browser. now that is not too bad, but i would like and it would be much better if the panorama would open inside my current swf. i remember i managed to do this. (sorry i forgot the code for it!!!) but when this was done, it would cover all my other buttons. i tried different things with changing levels and those sort of things, but nothing seemed to worked. (i was able to display a button on top of the swf but its AS woudlnt work) does anybody know how to do this? can someone explain it quite simply and in detail? i just want to load an swf in my project, and have a button on top of it with which i can unload this swf. (note that i cannot edit the settings of the panorama swf except for its size and dimensions and stuff, i cannot add a button or AS into it)

View 1 Replies

ActionScript 2.0 :: Unloading XML Before Loading Another?

Jul 20, 2006

This image gallery I am working on loads the thumbnails(from the XML) into a scrollbar. It works for the first one fine, but when I click on another button for another gallery it adds the thumbs of the new gallery at the end of the ones already there, but what I trying to do is have the previous thumbs unload then load the new xml with the appropriate thumbnails.I have tried removeNode(); to unloadMovie(); and various other functions but nothing works. The XML does not unload before the next one loads EVER. The removeNode(); doesnt even remove all the children, which i thought it was supposed to.

Code:
xmlData.firstChild.removeNode();

This is in a function called on the release of all buttons, but it doesnt do anything. This function is located in the same frame as the loadXML function. Is this the wrong place to put it?

View 4 Replies

ActionScript 2.0 :: Loading & Unloading Movieclips

Aug 8, 2010

I start off my game with an empty movieclip located in the middle of the stage. I then load a movieclip using the loadMovie method. At some point I would like to unload the movieclip and then reload another one, sort of a different scene if you will. The new movieclip has a number of other nested movieclips that I will use as buttons and I have coded a function that is called that creates these buttons. Here's what it would look like:[code]The roomSetUp function contains info on how the room should look and the button codes. The problem is that the setup function runs before the new movieclip is loaded. Seems that there is no way to have Flash 'Yield' until the movieclip is loaded and then go to the last function. Any suggestions other than MovieClipLoader?

View 2 Replies

ActionScript 3.0 :: Loading SWF With Each Button And Unloading Old One

Sep 18, 2008

I am making a site and I want each button to load an swf, which would be the content of each page. When I click on each button the swf will load, however, the old swf will not go away.

View 2 Replies

ActionScript 1/2 :: Loading/unLoading XML Data?

Jun 15, 2009

I have an accordion style btn that expands and contracts base on the user's cursor.
When the btn expands it loads an external XML file. The problem I'm having is that after the btn contracts the loaded XML content is still in place. Is there a way to unload this XML content after it has loaded?

View 5 Replies

Professional :: Loading And Unloading External SWF?

Apr 1, 2010

I'm trying to load an external swf and unload it after its completion. I have tried a few things and am stuck. Here is my current code to loading the swf, which seems to be working fine, its the unload I cant get:

import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
function startLoad() {
[Code] .....

View 3 Replies

ActionScript 3.0 :: Loading And Unloading External Swf?

Nov 29, 2010

I have a external swf that has an embedded video that loads automatically. Once it loads I have a button that unloads it and reloads. The first time I unload it, it works fine. The second time the video unloads but the sound continues? This happens each time I load and unload; the sound continues to loop.
 
stage.scaleMode = "noScale";
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("swfs1/ME_video1a1.swf");

[Code]....

View 4 Replies

ActionScript 3.0 :: Loading And Unloading An SWF File?

Dec 2, 2010

I'm currently working on a educational project for e-learning. This  project has multiple buttons for opening several specific SWF files.  What I want to accomplish is to be able to use my container file with 3  primary buttons for the named SWF files and have them load in a specific  location in the container SWF. Then I have a separate button that just  needs to close the loaded SWF file. FYI, the 3 primary buttons will be  covered by the loaded swf file. I'm including my AS3 code for review. I  can load a SWF and close it once. After that, it doesn't work.

[Code]...

View 2 Replies

Actionscript 3 :: Loading And Unloading New Models?

Dec 3, 2010

am using pv3d to load a couple of models for a school project. The models typically don't do much, they just spin on a dial when fired up. At any given time, there are only two models shown. My initial thought is to utilize two global Collada instances and have a function call the Collada load function to load the new models into the instances. Looking through the Collada parser, it would seem that the load function appends the new model, leaving the existing models up there, as opposed to loading in a new set of vertices.

Fair enough. At this point I decide that I should remove the models from the scene, and create new ones every time the function fires.Here is where my problem lies. This probably from my lack of understanding on the workings of AS3/pv3d, so please bear with me. When I remove the models from the scene and add them again, the models do not appear within the scene. However, the model instances still remain traceable when I run a trace.Here is the code for reference. I omitted the portions which are duplicates.Instances are created on a global level as onRenderTick can't seem to reference it if I create it on any other level

public var model:Collada = new Collada();
public var model2:Collada = new Collada();

The initial properties such as x y position and pitch are set when the dials are created

public function setupDials():void {
var materialList:MaterialsList = new MaterialsList();
var bitmapFileMaterial:BitmapFileMaterial = new

[code].....

View 1 Replies

ActionScript 2.0 :: Loading & Unloading Music?

Jun 26, 2009

add a couple of music files to a CD presentation using actionscript. I know how to load one track but how do I unload a tack when it's finished and load another after that? Here is the code I have so far:

myMusic = new Sound(myMusic_Mc);
myMusic.loadSound("Doin It.mp3");
myMusic.start(0,5);

View 0 Replies

ActionScript 3.0 :: Loading / Unloading Swf With Button

Aug 12, 2009

I have this code that unloads all swfs that the home swf connects too. by going back to the first frame label of the home.swf. Instead of it going to the first frame label of the home.swf I need the code to load another swf.The new button name is "back_btn", instead of the homebtn.[code]

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved