Comments (6)
Not sure in what part of this I should look into? Do you want to say that moxie.image.Image
doesn't release memory even after it is destroyed?
from moxie.
Exactly
I do also test with original Plupload Exemple and if you generate 10 thumbs images (6mb each) you reach more then 500Mbyte memory in FireFox or Chrome
Destroy method do not free memory
(THANKS for your time ;-) )
from moxie.
Hi jayarjo,
Did you investigate about my issue ? I still have a lot of memory leaks problems
Thanks in advance
from moxie.
@buddycat75 no, still have no clue. While I did track down some zombie references in the heap, they didn't seem to contribute that much to the overall memory usage. It still continues to crawl up quickly (Firefox even managed to crash couple of times, when usage of memory exceeded 2gb). However if they survive initial load, memory usage eventually drops. And since there's no way to force garbage collection from javascript, I'd conclude here that that's simply the way those browsers are designed. They eat up memory as fast as possible while it's available and start to garbage collect only when there's a shortage of it.
Suggestions are welcome.
from moxie.
Some issues that might have caused memory leaks were fixed now. Also for those browsers that support blob uris, we will be using that, so won't have to preload as string and then convert.
from moxie.
FYI, I found a bug which may be also causing @buddycat75's problem.
I noticed that after using image.getAsDataURL, I could not destroy the runtime when I called uploader.destroy() for Flash and Silverlight. The runtime.client was 1 and never 0 and as a result, Flash and Silverlight shims were still on the browse button.
In moxie/runtime/flash/image/Image (which is also inherited by Silverlight) I noticed there is a ghost blob object which is not destroyed anywhere so it causes the Flash and Silverlight runtimes to think there is still some connected object so they are not completely destroyed. I fixed by destroying the temp blob object before returning the dataUrl string:
getAsDataURL: function() {
var self = this.getRuntime()
, blob = self.Image.getAsBlob.apply(this, arguments)
, frs
;
if (!blob) {
return null;
}
frs = new FileReaderSync();
/**FIX**/
//Fix memory leak for Flash and Silverlight, runtime is not destroyed because this blob is not destroyed
var dataUrl = frs.readAsDataURL(blob);
blob.destroy();
return dataUrl;
/** FIX **/
}
Note this problem was observed in moxie v1.5.7
from moxie.
Related Issues (20)
- In "Silverlight-runtime", the error "Invalid file extention" occurs .
- Flash FormData upload to S3 generates duplicate filename param and bombs out upload
- RangeError: Maximum call stack size exceeded - moxie.js - 1974
- preview picture in ie8 HOT 1
- mOxie .onload is not executed in plupload >= 2.2.0 HOT 2
- Bug. Runtime flash and plupload.addFile() not working HOT 2
- mOxie namespace gone? v1.5.3 HOT 14
- Can't get the size of a gif image? HOT 3
- Infinite events cycle on Angular 2 + IE9 HOT 12
- Suggestion: Modifying the XMLHttpRequest Api HOT 2
- Headers not sending on IE9 with flash HOT 5
- How to get a blob as dataurl? HOT 2
- How to install it with flash? HOT 1
- Flash Runtime support put http request? HOT 1
- Image preview error HOT 2
- File picker - multiple files. HOT 2
- In IPv6 environment, it is impossible to upload files normally
- Hide the visually hidden file input from assistive technologies
- Flash losing support in Chrome at the end of 2020. Future plans..? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moxie.