-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Description
The current implementation has a known memory leak in DestroyEnvironment() because ReleaseEnv is disabled (see issue #20). This limitation must be prominently documented in user-facing documentation before any production use.
Background
From PR #15 review:
The
ReleaseEnvfunction is currently disabled, meaning every environment creation leaks memory. This is acceptable for short-lived processes but CRITICAL for long-running applications.
Required Documentation Updates
1. README.md - Add Limitations Section
Add a prominent "Known Limitations" or "Current Status" section near the top:
## ⚠️ Current Limitations
**Not Production Ready**: This library is under active development and has known limitations:
- **Memory Leak**: The current implementation leaks memory on `DestroyEnvironment()` due to incomplete ORT API struct mapping (see #20)
- **Impact**: Not suitable for long-running applications that repeatedly create/destroy environments
- **Acceptable for**: Short-lived processes, testing, development
- **Status**: Tracked in #20, must be fixed before v1.0
See [LIMITATIONS.md](LIMITATIONS.md) for full details.2. Create LIMITATIONS.md
Document all known limitations with:
- Clear description of each issue
- Impact assessment
- Workarounds if any
- Timeline for fixes
- Link to tracking issue
3. Update environment.go godoc
Add warning to InitializeEnvironment() documentation:
// InitializeEnvironment initializes the ONNX Runtime environment.
//
// WARNING: Current implementation has a memory leak on DestroyEnvironment().
// Not recommended for long-running applications that repeatedly init/destroy.
// See: https://github.com/amikos-tech/pure-onnx/issues/20
//
// This function uses reference counting, so multiple calls are safe.4. Update TESTING.md
Document that integration tests should verify cleanup once #20 is fixed.
Acceptance Criteria
- README.md has prominent limitations section
- LIMITATIONS.md created with full details
-
InitializeEnvironment()godoc includes warning - Documentation clearly states "not production ready"
- Links to issue [TST] Fix OrtApi struct layout to enable proper ReleaseEnv cleanup #20 for tracking
Priority
High - Must be done before v1.0 or any production recommendation
Related Issues
- [TST] Fix OrtApi struct layout to enable proper ReleaseEnv cleanup #20 - Fix OrtApi struct layout to enable proper ReleaseEnv cleanup
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation