Use FreeCallback to support mixed Windows runtime libs #152

This commit is contained in:
Lovell Fuller
2015-11-14 13:58:05 +00:00
parent ede2ee9ce3
commit 2678d761ba
6 changed files with 37 additions and 6 deletions

9
src/common.cc Executable file → Normal file
View 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