attractivechaos/klib — pull request #30 by jmarshall (2014-03-12 16:12:42+00:00)
Title: Add ks_release() to kstring.h

Using this function is a more explicit way of transferring ownership than just "foo = str.s"; the latter leaves room for readers to wonder whether a subsequent "free(str.s)" has been forgotten.

For an example of it in use, see https://github.com/samtools/samtools/blob/develop/bam_sort.c