Hi,
when is it posible to define a "string" type safely? I think, the only situation is for const char * input parameter. Because otherwise we are gonna have memory leaks.
For example, for a function like:
char *foo();
if we attach it with:
attach_function :foo, :foo, [], :string
We are gonna have a nice memory leak because nobody is gonna release that string. When we call "foo" method in ruby, we get a String object, we cannot (or I don't know how) get the actual char pointer to release it (either from ruby or with another attached function where we pass the pointer and that function calls free, delete o whatever is necessary).
To unsubscribe from this group, send email to ruby-ffi+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.