Commit 85978177 authored by Milian Wolff's avatar Milian Wolff

Add empty-data optimization to Akonadi::CachePolicy.

This showed up in heaptrack, but was actually due to another issue
elsewhere. I still think this optimization does not hurt. But if
you don't want this, it could be skipped, since the following
optimizations will remove this as a hotspot anyways.

REVIEW: 121404
parent 8282540e
......@@ -54,8 +54,9 @@ public:
};
CachePolicy::CachePolicy()
: d(new Private)
{
static QSharedDataPointer<Private> sharedPrivate(new Private);
d = sharedPrivate;
}
CachePolicy::CachePolicy(const CachePolicy &other)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment