MOA Developer's Guide
MOA Interfaces | MOA Methods | MOA Types and Misc API

IMoaCalloc


Interface ID: IID_IMoaCalloc
Pointer type: PIMoaCalloc
Inheritance: IMoaUnknown
Header file: moaxtra.h

Description

This standard MOA callback interface is implemented by the every MOA application for the use of Xtras. It provides methods for use in allocating fixed memory. All MOA objects have an instance variable, pCalloc, that refers to this interface.

Methods

NRAlloc()
NRFree()

NRAlloc()

Syntax

NRAlloc(PIMoaCallocThis,

MoaUlongcb)

Parameters

This
Pointer to the IMoaCalloc interface

cb
MoaUlongInteger representing the size of the memory block to allocate

Returns

Pointer to allocated memory

Description

Returns a fixed block of memory at least cb bytes in size. The memory is zeroed out. If the request cannot be satisfied, NULL is returned.

NRFree()

Syntax

NRFree(PIMoaCalloc This,

PMoaVoid pv)

Parameters

This
Pointer to the IMoaCalloc interface

pv
PMoaVoidPointer to the allocated memory block

Returns

void

Description

Frees memory previously allocated with the NRAlloc() method.

Copyright © 1995-2007 Adobe Macromedia Software LLC, Inc.