iOS ClipboardRecentContent Leaks on Exit |
|||
Issue descriptionOn iOS, the ClipboardRecentContentIOS object is allocated on startup https://cs.chromium.org/chromium/src/ios/chrome/browser/ios_chrome_main_parts.mm?l=153-155 and handed off to a global variable pointer. https://cs.chromium.org/chromium/src/components/open_from_clipboard/clipboard_recent_content.cc?l=37 This global variable is never de-allocated, not even on shutdown.
,
Apr 5 2017
FYI, on iOS the ClipboardRecentContentIOS is being refactored so that code can be used from within an iOS extension (which must not depend on ICU, and thus can't use GURL).
,
Apr 5 2017
Also, I was under the impression that it was OK to leak (i.e. not delete on shutdown) singletons. Is this not true? We do this in a lot of places, at least on iOS.
,
Apr 5 2017
,
Apr 5 2017
>>> Also, I was under the impression that it was OK to leak (i.e. not delete on shutdown) singletons. Is this not true? We do this in a lot of places, at least on iOS. >>> You're right; I was confusing a past bug filed against me, which was a different issue. (It was a static variable that was allocated in effect on profile creation and never deleted.) I asked around and yes, process singletons are okay. I'm happy to close this bug. |
|||
►
Sign in to add a comment |
|||
Comment 1 by mpear...@chromium.org
, Apr 4 2017