Some questions:
What are the scope of the variables used in libraries? Will the variables listed under <params/> go out of scope after the library is complete and thus gets cleaned up by the game? Does the scope of the variables depend on how the library is used, like in <include_actions ref/> and <cue ref/>?
Also, is it absolutely required to clean-up variables by myself (i.e., explicitly use <remove_value/>)? I am worried I might create a memory leak and forget about it.
EDIT: Title
[HELP] MD Variable Lifetime and Removal
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 224
- Joined: Mon, 30. Jul 18, 04:16
[HELP] MD Variable Lifetime and Removal
The future awaits.
X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.
X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.
Hi,
The parameters defined in the head of a library do not need cleanup. As you suspected correctly they are used by calls of the library from other cues or scripts.
As a rule of thumb any value you define within a cue should be removed at the end (clean up).
And sorry for the delayed reply.
Cheers Euclid
The parameters defined in the head of a library do not need cleanup. As you suspected correctly they are used by calls of the library from other cues or scripts.
As a rule of thumb any value you define within a cue should be removed at the end (clean up).
And sorry for the delayed reply.
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786