Global Render Memory


This global requires some Python-based helpers, as the memory chunks managed by this interface are all opaque to the Python environment.

class lwsdk.LWGlobalPool(*args)

Bases: object

Proxy of C++ PCore::LWGlobalPool class

 ID(LWMemChunk mem) → char

Returns the chunk identifier. This is the name string that was passed to LWGlobalPool::create().

 create(char id, int size) → LWMemChunk

Creates a memory chunk with the given size and ID and returns a pointer to the memory. If you want the name string to uniquely identify the chunk, you should try to find a chunk with your ID before using the ID in create.

 find(char id) → LWMemChunk

Returns the memory chunk with the given ID. Multiple chunks may be created with the same ID, so this returns the first one.

 first() → LWMemChunk

Returns the first memory chunk in the pool. This and the LWGlobalPool::next() method allow you to traverse the entire list of memory chunks in the pool. Use them if you need to search for memory chunks using criteria more complex than just the chunk ID string.

 next(LWMemChunk mem) → LWMemChunk

Returns the next memory block in the list.

 size(LWMemChunk mem) → int

Returns the size in bytes of a memory chunk.

Previous topic

Interface Info

Next topic

Server Info

This Page