Code review comment for lp:~ted/ubuntu-app-launch/registry-cleanup

Revision history for this message
Ted Gould (ted) wrote :

Comments inline.

Generally the problem was that the initialization of most of the objects that the Registry was doing to do its work were initialized at basically random times. This lead to things like the bug that is attached.

The reason that this was is because they all wanted to have access the shared resources in the registry so they were waiting around for a std::shared_ptr<Registry> that we couldn't generate internally. So when they got a chance to grab it they'd scoop it up and initialize themselves.

So what the branch does is instead have those internal objects use std::shared_ptr<Registry::Impl> for most of those things so that it *is* something we can generate internally and pass around. Which means we can initialize all the objects when we build the Registry object. Which makes init significantly more predictable.

Also, it removes a couple raw pointers and some other minor internal API cleanups.

« Back to merge proposal