MDLCACHE CRITICAL SECTION(): Difference between revisions
Jump to navigation
Jump to search
Tip:Call
TomEdwards (talk | contribs) (Created page with '{{confirm|All subsequent models loaded in the current scope will be "cache locked": they won't be flushed if Source starts running out of memory.}} {{tip|Call <code>mdlcache…') |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
The '''<code>MDLCACHE_CRITICAL_SECTION()</code>''' macro causes everything loaded into the model cache from its invocation to the end of the current [[W:Scope (computer science)|scope]] to be "cache locked". This prevents the data from being deleted if the engine starts running out of memory. | |||
{{tip|Call <code>mdlcache->EndLock()</code> to end the lock | {{todo|When ''wouldn't'' you use this?}} | ||
{{tip|Call <code>mdlcache->EndLock()</code> to end the lock early.}} | |||
== See also == | == See also == | ||
Line 7: | Line 9: | ||
* <code>[[IMDLCache]]</code> | * <code>[[IMDLCache]]</code> | ||
[[Category:Macros]] | [[Category:Macros]] {{DISPLAYTITLE:MDLCACHE_CRITICAL_SECTION()}} |
Latest revision as of 08:04, 16 September 2011
The MDLCACHE_CRITICAL_SECTION()
macro causes everything loaded into the model cache from its invocation to the end of the current scope to be "cache locked". This prevents the data from being deleted if the engine starts running out of memory.
Todo: When wouldn't you use this?

mdlcache->EndLock()
to end the lock early.