Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
MapleAlloc - allocate memory in external code
MapleDispose - free memory in external code
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