I have a couple of dialog hook classes that release memory in the _Destroy event. I noticed that I am seeing an Internal Access Violation message from MicroStation if I unload the app. when the dialog is open. The _Destroy event was not being called in my hook classes. I added this call to MdlMain:
const bool SendUnloadMessages { true }; mdlDialog_sendMessagesOnUnload (mdlSystem_getCurrMdlDesc (), SendUnloadMessages);
That seemed to eliminate the problem.