示例#1
0
/* Destroy a notmuch_message_t object.
 *
 * It can be useful to call this function in the case of a single
 * query object with many messages in the result, (such as iterating
 * over the entire database). Otherwise, it's fine to never call this
 * function and there will still be no memory leaks. (The memory from
 * the messages get reclaimed when the containing query is destroyed.)
 */
func (self *Message) Destroy() {
	if self.message == nil {
		return
	}
	C.notmuch_message_destroy(self.message)
}
示例#2
0
文件: message.go 项目: gmuch/gmuch
func (m *Message) Close() error {
	return (*cStruct)(m).doClose(func() error {
		C.notmuch_message_destroy(m.toC())
		return nil
	})
}