Skip to content

Fix Memory Leak in ExampleSideMenuViewController#2

Merged
noppefoxwolf merged 1 commit into
noppefoxwolf:mainfrom
TakayaShirai:fix/#1_fix_memory_leak_in_example_side_menu_view_controller
Oct 26, 2024
Merged

Fix Memory Leak in ExampleSideMenuViewController#2
noppefoxwolf merged 1 commit into
noppefoxwolf:mainfrom
TakayaShirai:fix/#1_fix_memory_leak_in_example_side_menu_view_controller

Conversation

@TakayaShirai
Copy link
Copy Markdown
Contributor

Issue Number

#1

Implementation Summary

This PR fixes the memory leak issue that occurred in the ExampleSideMenuViewController. The issue was caused by a strong reference by the animator.onTapDimmingView.

To resolve this, the code introduces weak references to the presented view controller inside the closures assigned to animator.onTapDimmingView. This ensures that the presented view controller can be properly deallocated when dismissed.

Reference

Screen.Recording.2024-10-26.at.3.46.59.PM.mov

@noppefoxwolf
Copy link
Copy Markdown
Owner

LGTM!

@noppefoxwolf noppefoxwolf merged commit fce1434 into noppefoxwolf:main Oct 26, 2024
@noppefoxwolf
Copy link
Copy Markdown
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants