[gambit-list] FFI Converting std::vector to scheme-vector (best practice)

Chris Mueller ruunsmail at gmail.com
Mon Aug 19 06:56:16 EDT 2013


On 19.08.2013 06:13, Mikael wrote:
> std::string requires delete to be used for proper deallocation and
> free() might just partially deallocate it, no? - what about trying with
> some more ordinary struct like tm ?

Could be, but i think this is not the case. The documentation mentioned 
if gambit is using g++ it should actually use 'delete (type*) 
internal-pointer'.

I've also checked this with a POD struct:

struct test { int A; int B }

It's no difference if
   * struct test is allocated with new
   * struct test is allocated with malloc

It's also leaking memory.











More information about the Gambit-list mailing list