Python - How to detect when user opens another file inside Blender?
Using a handler to remove my_class:
from bpy.app.handlers import persistent
@persistent
def handler_new_scene(scene):
    del bpy.types.Scene.my_class

I think del scene.my_class will work also, or scene.my_class = None if still need to have the attribute.
In the register function I add my function to the load_pre handler, which will run before a new scene is loaded:
bpy.app.handlers.load_pre.append(handler_new_scene)