A proper way to allocate memory in C extensions
30 Sep
2008
30 Sep
'08
2:16 p.m.
Is there a proper way to allocate memory for c extensions that will be compiled under both C and C++ versions of gambit? In the Xlib example this is used: (define (make-XColor-box) ((c-lambda () XColor* "___result_voidstar = ___EXT(___alloc_mem) (sizeof (XColor));"))) Should I do that for foreign objects/structs? What is the proper macro to free memory allocated this way?
6461
Age (days ago)
6461
Last active (days ago)
0 comments
1 participants
participants (1)
-
Frederick LeMaster