1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builtin: do not call C.GC_FREE with -gc boehm

This commit is contained in:
Delyan Angelov 2021-03-25 09:15:01 +02:00
parent b0878d3a92
commit 03d56865e3
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -315,7 +315,9 @@ pub fn free(ptr voidptr) {
return
}
$if gcboehm ? {
C.GC_FREE(ptr)
// It is better to leave it to Boehm's gc to free things.
// Calling C.GC_FREE(ptr) was tried initially, but does not work
// well with programs that do manual management themselves.
return
}
C.free(ptr)