Special Free actions on Foreign pointers
Hi list, Is it possible to set a particular "free-action" to a foreign pointer... ? I've read about the hcl::flag-special-free-action / hcl::add-special- free-action possibility, but in case of special processing to apply on a given foreign pointer, this system does not allow to differenciate it. If I have two foreign functions f1 and f2 that both return pointers, but to be "cleaned up" each by specific functions : clear-pointer- from-f1 and clean-pointer-from-f2, a common "special-free-function" will not differenciate between both (and between other possible foreign pointers). As a solution, I guess it is possible to create a new struct or class in which would be encapsulated the results from f1 and f2, and which type could be tested in the free-function, but isn't it a twisted way to proceed. Is there better solutions? Thanks. Jean Bresson