attempting to improve performance and part of that is to remove onetime listeners once the event has been triggered. Found this piece of code I think
in the function library and it seems to do the right thing, that is if a fire up fg and the aircraft the console tells me I have 221 odd listeners
remaining, yet once I want to check if another listener has been removed because lets say wow has changed, the same code now tells me there are now 414 listeners
remaining even though no additional code was added?
here is the code
- Code: Select all
var ls = setlistener("/sim/test", func(){
print("Property '/sim/test' has been changed");
});
setprop("/sim/test", "blah"); # trigger listener
var rem = removelistener(ls); # remove listener
gui.popupTip("There are " ~ rem ~ " listeners open " , 4);
So where do the extras come from ? C++ ?