This pull request fixes a small memory leak in Piraha.
If you change it from holding a smart_ptr to a regular ptr, how are you making sure that the pointee does not get deallocated once all other refs to it go away?
Steven R. Brandtauthor
The pointer is to a grammar object, which is, in turn, pointing to all the pattern elements it contains. Since the grammar object owns the lookup object, the lookup should not hold a pointer to the grammar. If it does, there is a cyclic reference which smart ptrs are not smart enough to clean up.