func (d *Document) MakePersistent() {
	d.mortal = false
}
MakePersistent unsets the flag
package dom
import (
	"github.com/lestrrat-go/libxml2/clib"
	"github.com/lestrrat-go/libxml2/types"
	"github.com/pkg/errors"
)
func CreateDocument() *Document {
	return NewDocument("1.0", "")
}
func NewDocument(version, encoding string) *Document {
	ptr := clib.XMLCreateDocument(version, encoding)
	return WrapDocument(ptr)
}
func (d *Document) Pointer() uintptr {
	return d.ptr
}
func (d *Document) AutoFree() {
	if !d.mortal {
		return
	}
	d.Free()
}
func (d *Document) MakeMortal() {
	d.mortal = true
}