engineStreamingFreeUpMemory | Multi Theft Auto: Wiki Skip to content

engineStreamingFreeUpMemory

Client-side
Server-side
Shared

This function frees up the streaming RAM memory.

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).

Important

This function is meant for advanced users only, as it can lead to stability issues. If you use it too often, the map might start to flicker.

OOP Syntax Help! I don't understand this!

Syntax

nil engineStreamingFreeUpMemory ( ​int bytes )
Required Arguments
  • bytes: The amount of RAM to be freed up in bytes.

Returns

  • nil: nothing

This functon returns nothing.

Code Examples

client

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

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

See Also

Engine Functions