Hi,
This is a bug in the current version of CVI (version 7.0). We will fix this in the next version. Thanks for bringing this to our notice. The bug was occurring because we are accidentally marking the handle to be invalid before passing it to the object callback function during destruction.
For now, you can work-around this bug by keeping track of the memory yourself and not calling CA_ServerGetObjData/CA_ServerReleaseObjData in the object callback function. You can associate the object handle with the pointer in a struct during object creation, and store the structs in a list. During object destruction, you can look up the struct in the list and get the pointer and free it. This is similar to what we do internally to get the object data from the handle. The toolb
ox.fp instrument has a simple list that you can use for this purpose. You can also do this in other ways instead of using structs and lists.
If the memory involved is not too big, then you may also consider letting the memory leak, as Windows will reclaim the memory anyway when the server exits.
Best regards,
Mohan
CVI R&D