Skip to content
Snippets Groups Projects
Commit cc225890 authored by Daniel Holbert's avatar Daniel Holbert
Browse files

Bug 1733465 part 4: Convert nsViewManager::gViewManagers to StaticAutoPtr so...

Bug 1733465 part 4: Convert nsViewManager::gViewManagers to StaticAutoPtr so that we don't have to manually delete it. r=tnikkel

This removes an explicit 'delete', by letting the StaticAutoPtr type handle the
deletion for us automatically and atomically when we clear its value.

Benefits/justification:
* This reduces the potential for double-free bugs.
* This matches existing patterns elsewhere in our code
  (search for e.g. "StaticAutoPtr<nsTArray")
* This reduces (by 1) the number of explicit `delete` calls that we need to
  consider, when auditing the codebase for potential memory safety issues.

Depends on D127180

Differential Revision: https://phabricator.services.mozilla.com/D127185
parent 54c1df0d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment