EngineStreamingFreeUpMemory

From Multi Theft Auto: Wiki
Revision as of 17:38, 20 September 2021 by Lvrent (talk | contribs)
Jump to navigation Jump to search

20901

[[{{{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 (100000000) -- 100 megabytes
    end
)

Requirements

This template will be deleted.

See Also