Skip to content

Source status: no status is stated in the source document, so none is assigned here. Do not treat this page as a finalized specification. The normative rules are in the Technical Specification.

Memory Management and Resource Ownership

The language will manage memory and resources safely, minimizing manual memory management.

1. Memory Safety

  • No unrestricted access to arbitrary memory.
  • No use-after-free.
  • No double-free.
  • No dangling references.
  • No buffer overflows.
  • No uninitialized memory access.

2. Ownership

  • Every owned resource must have a clearly defined owner.
  • Ownership transfers must be explicit.
  • Resources must not be used after ownership has been transferred or released.
  • Shared access must follow defined safety rules.

3. Automatic Resource Management

  • Memory should be reclaimed automatically where possible.
  • Files, database connections, locks, and other resources must have defined lifetimes.
  • Resources must be released when their permitted lifetime ends.
  • Cleanup must occur during normal execution and handled failure paths.

4. Compiler Enforcement

The compiler must detect invalid ownership transfers, unsafe references, and resource lifetime violations.

Design Goal

AI agents should not need to manually manage low-level memory to produce reliable software, and should not be able to introduce common memory-safety errors unnoticed.


Source and authority

This page migrates MEMORY.md in full. It is an explanatory / implementation document, not the normative specification. Where it simplifies a rule, the Technical Specification governs. The original file is preserved in source-original/LANG/.