In a few methods in image.go the default constructor for creating an ImageRef object was getting used.
&ImageRef{image: out}
The problem with this is that the finalizer is not set on these objects and thus Close() is never called. This keeps on filling the memory with zombie objects.
Coverage: 75.405% (-0.1%) from 75.501% when pulling 80e9cd3f7fe00a1fcc7d11343ccef537d5cadc0a on rektabhi:finalizer_fix into c6838fceef8d93bca9e044187a412540b62c6090 on davidbyttow:master.
In a few methods in
image.go
the default constructor for creating an ImageRef object was getting used.The problem with this is that the
finalizer
is not set on these objects and thusClose()
is never called. This keeps on filling the memory with zombie objects.Similar issue listed here: https://github.com/davidbyttow/govips/issues/334 and https://github.com/davidbyttow/govips/pull/336