EngineStreamingFreeUpMemory

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

* FEATURE ADDED IN 1.5.9 (REVISION: r20901)
This function frees up the streaming RAM memory.
[[{{{image}}}|link=|]] Note: This function isn't accurate. The function works more like try to free up at least this amount of bytes. It usually ends up freeing everything that isn't currently needed (which, depending on the scenery might be 1-200 megabytes).

Syntax

bool engineStreamingFreeUpMemory ( int bytes )

Required Arguments

  • bytes: The amount of RAM to be freed up in bytes.

Returns

  • Returns true if the function has succeeded, false otherwise.

Example

This example frees up the streaming memory when the resource starts:

addEventHandler ("onClientResourceStart", resourceRoot,
    function ()
        engineStreamingFreeUpMemory (104857600) -- 100 megabytes
    end
)

Requirements

Minimum server version n/a
Minimum client version 1.5.8-9.20901

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.8-9.20901" />

See Also

* FEATURE ADDED IN 1.5.9 (REVISION: r20704)
* FEATURE ADDED IN 1.5.9 (REVISION: r20704)
* FEATURE ADDED IN 1.5.9 (REVISION: r20704)
* FEATURE ADDED IN 1.5.9 (REVISION: r20901)