Revert "Settings: Fix the memory leak in Settings"

This reverts commit 32c91850341bc769bcee4bb6a9a2076fa1b0e55c.