_variant_t objects, and the like...
-
I've got a class with a _variant_t member variable. When I call delete on objects of my class, I get memory leaks. Is there a safe way of getting rid of these objects? Thanks, funbag:-O skydiving....if at first you don't succeed, you're fecked!
What are you using in the variants? I could see where some problems might occur if you are using safe arrays, but if you are just using the regular variant union variables, then I'm not too sure.. What are the memory leaks saying? Are the leaks explicitly of object of CYourClass? Or are they variant objects? //------------------------ CSignature::Jeff() ; PostMessage(WM_QUIT) ; //------------------------
-
What are you using in the variants? I could see where some problems might occur if you are using safe arrays, but if you are just using the regular variant union variables, then I'm not too sure.. What are the memory leaks saying? Are the leaks explicitly of object of CYourClass? Or are they variant objects? //------------------------ CSignature::Jeff() ; PostMessage(WM_QUIT) ; //------------------------
My class is derived from IADORecordBinding, and has the two _variant_t objects. They're used to read an adVariant and an adGUID type from a recordset object, to which my object is bound. The adVariant is just used to store a date from the db, while the GUID is used as a record identifier. When I delete my object, a COM error is raised, 800020008 - bad variable type. The memory leaks seem to be a cascade of the error of not deleteing my object correctly. I hope this helps Thanks, funbag skydiving....if at first you don't succeed, you're fecked!