diff options
| author | Frank Reininghaus <[email protected]> | 2013-06-05 23:18:26 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2013-06-05 23:18:26 +0200 |
| commit | c6494823c8b79a33bf333a1e3a2c58ac6d74dcea (patch) | |
| tree | 8cf94c9e39eaf9480a8733ae4dde1b5ae48de9bd /src/kitemviews/kfileitemmodel.h | |
| parent | 9ec8c3b790ee4c35c3ea168d5ac169ab2cab6c0a (diff) | |
Reduce KFileItemModel memory usage by making use of implicit sharing
The idea is based on
http://milianw.de/blog/katekdevelop-sprint-vienna-2012-take-1
REVIEW: 110686
Diffstat (limited to 'src/kitemviews/kfileitemmodel.h')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 1d837cb2a..1d2d8c172 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -430,6 +430,12 @@ private: static void determineMimeTypes(const KFileItemList& items, int timeout); /** + * @return Returns a copy of \a value that is implicitly shared + * with other users to save memory. + */ + static QByteArray sharedValue(const QByteArray& value); + + /** * Checks if the model's internal data structures are consistent. */ bool isConsistent() const; |
