Which located is better? and why?
A better solution would be Sample B as it is always good to have features such as deactivate or closure within the setting or profile page.
The most frequent or essential options are only placed in the top navigation bar. Within the settings button, provide quick links to sections (probably the frequently used ones) in the settings page that would help a user to easily access in one click (Eg. Manage Password).
- Facebook: Deactivate Account option is available only on the settings page and not inside the setting icon in the top navigation bar.
- Google: Deactivate Account option is available on My Account page which can be opened on clicking the profile icon in the top navigation bar.