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:
parent
b0878d3a92
commit
03d56865e3
@ -315,7 +315,9 @@ pub fn free(ptr voidptr) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
$if gcboehm ? {
|
$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
|
return
|
||||||
}
|
}
|
||||||
C.free(ptr)
|
C.free(ptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user