onChange scenePhase active onChange scenePhase inactive onChange scenePhase background onChange scenePhase inactive onChange scenePhase active AppDelegate willFinishLaunchingWithOptions AppDelegate didFinishLaunchingWithOptions onChange scenePhase active active onChange scenePhase inactive inactive onChange scenePhase background background AppDelegate applicationWillTerminate - press home button AppDelegate willFinishLaunchingWithOptions AppDelegate didFinishLaunchingWithOptions SceneDelegate sceneWillEnterForeground onChange scenePhase active active SceneDelegate sceneDidBecomeActive onChange scenePhase inactive inactive SceneDelegate sceneWillResignActive onChange scenePhase background background SceneDelegate sceneDidEnterBackground - press app icon again... onChange scenePhase inactive inactive SceneDelegate sceneWillEnterForeground onChange scenePhase active active SceneDelegate sceneDidBecomeActive This example demonstrates a memory leak involving strong references to a person and an apartment. Objects are visible in the graph, and memory is not properly cleaned up. 
Memory issues have been resolved by implementing weak references, ensuring proper memory cleanup. Objects are no longer visible in the graph. 