urt-rs / docs /research /RUST_ENTITY_RELEASE.md
nmarshall's picture
gameplay: port entity release plans
5248e2c
|
Raw History Blame Contribute Delete
1.16 kB

Entity release in the fixed pool

release_entity applies the record writes of QVM function 277400 to an entity slot. A null selection returns no requests. Otherwise unlink comes first, followed by the nonnull nested object and parent and then the nine optional resource fields in source order. Multiple fields referencing the same pointer retain separate release requests.

A protected record keeps its in-use word and object pointer while the resource fields are cleared. An unprotected record is zeroed across all 880 bytes, then receives the original freed classname and tag and the current free timestamp. If the caller cannot supply the child pointer for a nonnull object, Rust rejects before changing the record. The engine consumes the requests separately.

The parity report checks all 49 source cases by hashing every word of the final record in little-endian order and comparing the complete request sequence. It also checks the typed error for an unresolved child pointer. This stage covers free and prepares the fixed pool for free-to-allocation integration. Engine effects and the frame scheduler remain external.