It works because the debug version probably zeroes the stack memory it frees while release mode doesn't. So in the release mode the object is still there although formally it has been deallocated. In debug you either dereference a null object or the stack location is being overwritten by another data.
Bookmarks