builtin: do not call C.GC_FREE with -gc boehm
							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