#ifndef LIBNQUTILITY_DLL_WIN32
#define LIBNQUTILITY_DLL_WIN32 "./libnqutility.dll"
#endif
#ifndef LIBNQUTILITY_DLL_UNIX
#define LIBNQUTILITY_DLL_UNIX "./libnqutility.so"
#endif
/var/nq_utility/nq_utility = new
/nq_utility/proc/CallProc(function, ...)
var/list/L = args.Copy(2)
//return call(world.system_type == MS_WINDOWS ? LIBNQUTILITY_DLL_WIN32 : LIBNQUTILITY_DLL_UNIX, function)(arglist(L))
. = call(world.system_type == MS_WINDOWS ? LIBNQUTILITY_DLL_WIN32 : LIBNQUTILITY_DLL_UNIX, function)(arglist(L))
del(L)
In the above case, call()() holds onto the list L. Only a hard-delete rids the list.
Numbered Steps to Reproduce Problem:
1. Install NullQuery.Common Operations in a project
2. Execute Random() a few times (found in nq_rand.dm)
3. Observe the memory for lists
Expected Results: I expected the list L to be garbage collected after the proc has ended/returned.
Actual Results: The list L remains in memory indefinitely.
Does the problem occur:
Every time? Or how often? Every time
In other games? Yes
In other user accounts? N/A
On other computers? N/A
When does the problem NOT occur? N/A
Workarounds: N/A
Run the project, use the "test" verb, observe the memory stat for lists.