Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Native Memory Leaks #27

Merged
merged 2 commits into from
Sep 7, 2021
Merged

Fixes Native Memory Leaks #27

merged 2 commits into from
Sep 7, 2021

Conversation

SkyeHoefling
Copy link
Contributor

@SkyeHoefling SkyeHoefling commented Sep 7, 2021

Fixes: #21

Description

Fixes memory leak when writing IImage to storage, the output image was never released. Added new native API invocation to release native image memory.

Merge Checklist

  • Added unit or integration tests (if not explain)
  • Benchmarks are equivalent or faster

@SkyeHoefling SkyeHoefling changed the title Memory leaks Fixes Native Memory Leaks Sep 7, 2021
@github-actions
Copy link

github-actions bot commented Sep 7, 2021

Benchmark Comparison

Benchmarking comparison between this Pull Request and the comitted values at benchmarks/results

thumbnail

 No differences found between the benchmark results with threshold 10%.
 

primary

 summary:
better: 1, geomean: 1.174
total diff: 1

No Slower results for the provided threshold = 10% and noise filter = 0.3ns.

| Faster                                                          | base/diff | Base Median (ns) | Diff Median (ns) | Modality|
| --------------------------------------------------------------- | ---------:| ----------------:| ----------------:| -------- |
| FileOnQ.Imaging.Heif.Benchmarks.PrimaryImage.PrimaryImage_Write |      1.17 |    2947325900.00 |    2509865500.00 | several?|

No file given
 

Benchmark Results

thumbnail

BenchmarkDotNet=v0.13.0, OS=Windows 10.0.17763.2114 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v4 2.30GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=5.0.400
 [Host]     : .NET 5.0.9 (5.0.921.35908), X64 RyuJIT
 Job-ONQKLS : .NET 5.0.9 (5.0.921.35908), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated Allocated native memory Native memory leak
Thumbnail_Write 66.20 ms 1.317 ms 3.078 ms - - - 280 B 5,125,137 B -

primary

BenchmarkDotNet=v0.13.0, OS=Windows 10.0.17763.2114 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v4 2.30GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=5.0.400
 [Host]     : .NET 5.0.9 (5.0.921.35908), X64 RyuJIT
 Job-TNXGEV : .NET 5.0.9 (5.0.921.35908), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated Allocated native memory Native memory leak
PrimaryImage_Write 2.536 s 0.0501 s 0.0954 s - - - 248 B 222,029,996 B -

@SkyeHoefling
Copy link
Contributor Author

Confirmed benchmarks above show - for Native memory leak, this means the leaks are fixed

@SkyeHoefling SkyeHoefling merged commit 04a8e9e into main Sep 7, 2021
@SkyeHoefling SkyeHoefling deleted the memory_leaks branch September 8, 2021 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix All Memory Leaks
1 participant