Memory

Optimization

Manual memory optimization and GC.

1 min readDocumentationEdit this page

Optimize#

typescript
import { optimizer } from '@AxilJS/memory'
 
const result = await optimizer.optimize()
result.freedMb
result.gcTriggered
result.actions

GC#

typescript
import { triggerGC, isGCAvailable } from '@AxilJS/memory'
 
if (isGCAvailable()) triggerGC()

Enable with: node --expose-gc dist/main.js

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY