Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

DP QC UNLIMITEDTEMPSTRINGS

From Quake Wiki

Revision as of 01:18, 25 March 2013 by Hectate (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This extension alters Quake behavior such that instead of reusing a single tempstring (or multiple) there are an unlimited number of tempstrings, which are removed only when a QC function invoked by the engine returns, eliminating almost all imaginable concerns with string handling in QuakeC.

In short:

You can now use and abuse tempstrings as much as you like, you still have to use strzone (FRIK_FILE) for permanent storage however.

Implementation notes for other engine coders: These tempstrings are expected to be stored in a contiguous buffer in memory which may be fixed size or controlled by a cvar, or automatically grown on demand (in the case of DarkPlaces).

This concept is similar to quake's Zone system, however these are all freed when the QC interpreter returns.

This is basically a poor man's garbage collection system for strings.