Hi! I use ECL as an embed script for my application. I need to store a
foreign pointer and I would like to tell gc to collect it. Well, I can
do:

...
cl_object cl_data = ecl_make_pointer(new my_type);
...
(some (lisp 'code (with cl_data)))
...

After that I can directly call back in C++ and delete cl_data:

cl_object my_type_delete(cl_object x){
 delete (my_type*)ecl_to_pointer(x);
 return Ct;}

But it is inconvenient in many cases. Is there a way to tell gc to
collect cl_data and to call my_type_delete when it is deleting the
holder of my pointer?

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to