mirror of
https://github.com/lovell/sharp.git
synced 2026-02-05 06:06:18 +01:00
Use FreeCallback to support mixed Windows runtime libs #152
This commit is contained in:
9
src/common.cc
Executable file → Normal file
9
src/common.cc
Executable file → Normal file
@@ -177,4 +177,13 @@ namespace sharp {
|
||||
return window_size;
|
||||
}
|
||||
|
||||
/*
|
||||
Called when a Buffer undergoes GC, required to support mixed runtime libraries in Windows
|
||||
*/
|
||||
void FreeCallback(char* data, void* hint) {
|
||||
if (data != NULL) {
|
||||
g_free(data);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sharp
|
||||
|
||||
Reference in New Issue
Block a user