New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 708338 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

iOS ClipboardRecentContent Leaks on Exit

Project Member Reported by mpear...@chromium.org, Apr 4 2017

Issue description


On 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.

 
I'm taking ownership of this issue because the situation on other platforms is more complex and I might end up with a solution that also works for iOS.

Comment 2 by jif@chromium.org, 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).

Comment 3 by jif@chromium.org, 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.
Components: Internals
Status: Fixed (was: Assigned)
>>>
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