I have a function that takes a list of pointers CRuntimeClassto customize the view. I would like to return without any action if a function is called with a list of the same classes that are already configured. Saving pointer values and comparing them on the next call is currently working, but I want to check that this is a legal thing, and not something that just happens. Maybe my doc-search-fu is missing, but I can’t find it anywhere, which guarantees that the pointer value returned from the RUNTIME_CLASS () macro for this class will be the same for the life of the program. The closest I could find is in the docs forCObject::GetRuntimeClass() :
There is one CRuntimeClass structure for each class derived from CObject.
This means that the value of the pointer should not change, but it certainly will not indicate it. Does anyone have anything more specific in this regard? Or is there a better way to compare CRuntimeClasses?
source
share