Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
GieltjE18197yC# with Magick.net, it's resizing, trimming images with proper multithreading. Haven't had time to narrow it down further as I had to leave for home just after discovery.
Even with 32GB ram it's pretty fast in filling that. -
GieltjE18197y@creator yeah sorry, fiber internet and a high end cpu/ram/ssd combo will fuck up your day pretty fast....
-
GieltjE18197yEnd result, getting the pixel collection and forgetting to dispose it is an understandable memory leak.
-
CWins48117yIs it a real leak in a technical way, or is it just the gc not knowing the real size of the data?
In some imaging libraries, the image data is in unmanaged memory and thus the managed object itself is only a few bytes with a handle. The gc may even dispose the data with the objects finalizer, but it can't know that a few small objects in memory are linked to gigabytes of data, so it may keep them alive longer than required.
Enforcing gc is normal when working with that kind of library. -
GieltjE18197yLooke like leak, imagemagick uses a native library and the scope of the leak is just a few lines in a sepdrate function, so if it were disposable the GC would do so every few seconds but it doesn't.
Using the proper dispose/using statement remedies it completely.
Just created the mother of all memory leaks, 300MB/s :|
undefined