qiqian / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

no way to free memory from managed code #109

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build webp as a DLL on Windows.
 nmake /f Makefile.vc CFG=release-dynamic
2. Load the DLL in C#.
3. Encode some data with WebPEncode*().

What is the expected output? What do you see instead?
No way short of PInvoking free() to free the output returned.
This only works if the same C-Runtime is used. If the dll is linked statically, 
RTLIBCFG=static, the function will crash.

Original issue reported on code.google.com by jz...@google.com on 13 Feb 2012 at 10:09

Attachments:

GoogleCodeExporter commented 8 years ago
https://gerrit.chromium.org/gerrit/#change,16310

Original comment by jz...@google.com on 21 Feb 2012 at 9:51

GoogleCodeExporter commented 8 years ago
This change has been submitted.

Original comment by jz...@google.com on 22 Feb 2012 at 6:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
IMHO, the WebPFree() function should be exposed in the public API in any case; 
if you build your WebP lib with CFG=release-dynamic/RTLIBCFG=dynamic settings 
you also need this function in native C/C++ code...

Original comment by kosta-ch...@ks-baumann.de on 14 Sep 2012 at 12:45

GoogleCodeExporter commented 8 years ago
This is exposed in all dll builds done by the Makefile.vc. It may be more 
consistent to expose it as part of the main API, but currently this is not done.

Original comment by jz...@google.com on 14 Sep 2012 at 5:12

GoogleCodeExporter commented 8 years ago
I would like to reopen this issue until the WebPFree() function is exposed in 
the public API as well...

Original comment by google-s...@ks-baumann.de on 3 Oct 2012 at 2:24

GoogleCodeExporter commented 8 years ago
I would like to get this pull request integrated to fix this issue in a proper 
manner:
    https://github.com/AIM360/libwebp/commit/bf793a89b4d47577581153a58cce54897ccdc627

Original comment by kosta-ch...@ks-baumann.de on 11 Feb 2014 at 11:07

GoogleCodeExporter commented 8 years ago
This will modify the API, so we'll look at this before the next release.

Original comment by jz...@google.com on 11 Feb 2014 at 7:27

GoogleCodeExporter commented 8 years ago
Issue 190 has been merged into this issue.

Original comment by jz...@google.com on 12 Feb 2014 at 12:38

GoogleCodeExporter commented 8 years ago
Any chance that this gets finally integrated?

Original comment by kosta-ch...@ks-baumann.de on 31 Jan 2015 at 4:10

GoogleCodeExporter commented 8 years ago
This is a pure addition and you already expose this API on windows (in a hacky 
way for .NET in the makefile.vc). But this does not help in cross platform 
development.

Original comment by kosta-ch...@ks-baumann.de on 31 Jan 2015 at 4:14