Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
Memory leak while converting images with FreeImage.Net

When loading the image with the nuget package, (FreeImage 3.18.0.0) it does not unload memory even if '''dib.SetNull()''' was set.

var dib = FreeImage.Load(FREE_IMAGE_FORMAT.FIF_PNG, pngFile.FullName,
FREE_IMAGE_LOAD_FLAGS.DEFAULT);
FreeImage.Save(FREE_IMAGE_FORMAT.FIF_JP2, dib, jpgFile.FullName, FREE_IMAGE_SAVE_FLAGS.JPEG_OPTIMIZE);
dib.SetNull();
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

FreeImage has additional copy of image you need to unload. FreeImage_Load Memory Leak

try: FreeImage.Unload(dib);

var dib = FreeImage.Load(FREE_IMAGE_FORMAT.FIF_PNG, pngFile.FullName,
FREE_IMAGE_LOAD_FLAGS.DEFAULT);
FreeImage.Save(FREE_IMAGE_FORMAT.FIF_JP2, dib, jpgFile.FullName, FREE_IMAGE_SAVE_FLAGS.JPEG_OPTIMIZE);
FreeImage.Unload(dib);
dib.SetNull();
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!