When your application is unloaded, you must clean up any custom classes or commands that your application has created. This should take place in the AcRx::kUnloadAppMsg case of your acrxEntryPoint() function, or in a function called from that case.
Usually ObjectARX commands are removed by groups, using acedRegCmds->removeGroup().
Use the deleteAcRxClass() function to remove your custom classes from the AcRx runtime tree. Classes must be removed starting with the leaves of derived classes first, working up the class tree to parent classes.
There is no way to tell AutoCAD to forget about AcDbObject instances that are currently resident in a database. However, when an application is unloaded, AutoCAD will automatically turn such objects into instances of AcDbProxyObject or AcDbProxyEntity.
You can use the acrxServiceDictionary->remove() function to remove any service that your application has registered. See the listing for acrxServiceDictionary in the ObjectARX Reference.