Cleaner way to ensure some classes heap allocated
commitba0535eb27bcf495d584ae1db9f3d5c2fd5f6b41
authorOlly Betts <olly@survex.com>
Wed, 14 Dec 2016 01:14:38 +0000 (14 14:14 +1300)
committerOlly Betts <olly@survex.com>
Wed, 14 Dec 2016 02:15:06 +0000 (14 15:15 +1300)
treeea813f6feb8d80cf9f33f214cac46eaf108a6e68
parent475c19eab5e04670a68f53aa0c2be57838a6fa86
Cleaner way to ensure some classes heap allocated

We use to hide the destructor and add a "destroy()" method which
did "delete this;" - instead hide the constructor and add a factory
static method which calls "new".

(cherry picked from commit 0f384e8db2e131431a4d79e703ce377dcffd16a4)
xapian-core/queryparser/queryparser.lemony