int *myglobal;repeat same code, but access what myglobal points to instead of setting to 42. Memory corruption is what @safe code is trying to prevent. This would lead to memory corruption.
You mean, the class destructor accesses a GC-allocated memory? That's indeed unsafe, but unrelated to globals.
