Skip to content

Memory Leak Assistance Request #2952

Answered by antonfirsov
DrizzleTime asked this question in Q&A
Discussion options

You must be logged in to vote

A significant amount of unmanaged memory was not being released

ImageSharp is pooling umanaged memory for performance reasons. In most cases there is no harm from this behavior and the pool sizes have a platform-specific upper limit, but there are knobs to customize it if necessary: https://docs.sixlabors.com/articles/imagesharp/memorymanagement.html

Note that missing dispose calls / using blocks can make the pooling behavior suboptimal by delaying pool returns until finalizer runs. Your code seems to be correct at the first glance, but just in case, note that the quoted article demonstrates a technique to troubleshoot Image/buffer leaks.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JimBobSquarePants
Comment options

Answer selected by DrizzleTime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants