Booritas / slideio

BSD 3-Clause "New" or "Revised" License
49 stars 2 forks source link

Leaking Memory on Windows #6

Closed s1910458007 closed 1 year ago

s1910458007 commented 1 year ago

Hi, could it be possible, that the problem with memory leaks from issue #1 (that was fixed for linux) is still present for windows? I have exactly the same behaviour as described in the issue. Could you please check the latest version? thanks in advance!

Booritas commented 1 year ago

Hello, thanks a lot for your message. I'll check the issue again. Unfortunately, some leaks may appear only for specific images. It may depend on internal structure, compression, etc. More information would help to localize the problem. Important are:

s1910458007 commented 1 year ago

Hello again, thank you for the quick reply!

of course, here you are:

you can download a zip file that contains the svs file via the following link: https://drive.google.com/file/d/17f2vuQUjjsANVaxoHeCUM4YB-JutQuiY/view?usp=sharing

just for the case that you are interested in the hardware i am using:

Please let me know if you need any further information (source code, detailed description, ...)

Best Regards, Daniel :)

Booritas commented 1 year ago

Hi Daniel, Thanks for the image. Now I have everything for the investigation of the problem! Best regards, Stanislav

Booritas commented 1 year ago

Hi again, Could you send me a code snippet how do you work with the image? A direct test (opening the image and reading of a region) does not show any memory leak. Thanks, Stanislav

s1910458007 commented 1 year ago

Hello Stanislav, because of your last message I doublechecked my problem once again in more detail. You are absolutely right, the slideio library is not the cause of my problem! Something else allocated most of my memory, and for that reason the scene.read_block() did not work properly any more (seems like scene.read_block() needs a remarkable amount of free RAM, otherwise the runtime increases dramatically). Sorry to trouble you and thank you for excellent service! best regards Daniel

Booritas commented 1 year ago

Hi Daniel, thanks for the message and sorry for the delay with the answer. Normally, read_block should not require a lot of memory, unless you read a really large image block in the original resolution. If you read only a part of an image or don't need high resolution, the function should not allocate much more memory than the requested region requires. You can check the tutorial how to read a region with rescaling. I hope it helps, Best Regards , Stanislav