MapleAlloc - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : VB Application Programming Interface : Memory and Foreign Object Management : OpenMaple/VB/MapleAlloc

MapleAlloc

allocate memory in external code

MapleDispose

free memory in external code

 

Calling Sequence

Parameters

Description

Calling Sequence

MapleAlloc(kv, n)

MapleDispose(kv, s)

Parameters

kv

-

kernel handle returned by StartMaple

n

-

number of bytes to allocate

s

-

Maple object

Description

• 

These functions are part of the OpenMaple interface to Microsoft Visual Basic.

• 

The MapleAlloc function allocates n bytes of memory and returns a pointer to it. The MapleDispose function frees this memory so it can be reused for other purposes.

• 

MapleAlloc is used to access temporary memory that will be cleaned up by the Maple garbage collector.  The memory returned by MapleAlloc cannot be protected from gc. To allocate memory that persists, use standard non-Maple memory allocation methods.

• 

MapleDispose releases the memory allocated to the structure s. It must be used only on data structures created using MapleAlloc.

See Also

dismantle

gc

OpenMaple

OpenMaple/VB/API

OpenMaple/VB/Examples

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam