Manage memory and references in storeDecoder
mainThe storeDecoder uses an internal cache and a result buffer to manage valueRef ownership during the decoding process. To prevent memory leaks in the underlying valueStore, follow these rules:
UnmarshalMaxMindDBCursor(cursor): Decodes the value at the current cursor. If a result was already stored from a previous call that wasn't taken, it is automatically released.takeResult(): Transfers ownership of the most recently decoded top-levelvalueRefto the caller. Once called, the decoder's internalresultis set tonilValueRef.close(): This is critical. It releases the currentresultand all references stored in the internalcache(used for deduplication/interning during the decode process). Always call this when the decoder is no longer needed.