]> src.bluestatic.org Git - zcpointer.git/commit
Reduce the size of ref<T> to a single pointer.
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 8 Oct 2016 21:23:27 +0000 (17:23 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 8 Oct 2016 21:23:27 +0000 (17:23 -0400)
commit148bfcc2c0d6627b259d29bf1690bbbb21d6b366
treef40d9ed5fcd53405c234872ab4c1acd0352a21c3
parente499e5e13b23f945a6961eb92ff2b919d5c3777f
Reduce the size of ref<T> to a single pointer.

Rather than tracking |T*|, |OwnedPtrDeleter<T>|, and a |bool|; ref<T> now just
holds an |owned<T>*|. It uses uintptr_t's max value as a deletion sentinel
rather than a separate flag. And with the actual owned<T>*, the deleter doesn't
need to be held separately either.
zcpointer.h