davidbyttow / govips

A lightning fast image processing and resizing library for Go
MIT License
1.28k stars 199 forks source link

Added missing finalizer method #361

Closed rektabhi closed 1 year ago

rektabhi commented 1 year ago

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.

Similar issue listed here: https://github.com/davidbyttow/govips/issues/334 and https://github.com/davidbyttow/govips/pull/336

coveralls commented 1 year ago

Coverage Status

Coverage: 75.405% (-0.1%) from 75.501% when pulling 80e9cd3f7fe00a1fcc7d11343ccef537d5cadc0a on rektabhi:finalizer_fix into c6838fceef8d93bca9e044187a412540b62c6090 on davidbyttow:master.

tonimelisma commented 1 year ago

Hey @rektabhi why did you close this PR?

rektabhi commented 1 year ago

@tonimelisma Some tests were failing, I will re-raise after fixing the tests. Did not get time to look at the failing tests.