Reply To: Reusing pooled FSM allocates memory whereas BT doesn't

NodeCanvas Forums Support Reusing pooled FSM allocates memory whereas BT doesn't Reply To: Reusing pooled FSM allocates memory whereas BT doesn't

#11393
jakko
Participant

Hi,

No, there is no boxing with return values like Status, or for ConditionTasks. I haven’t looked at supporting more than one parameter yet as I don’t need it at the moment. I just wanted them to be as lean as possible and took a different approach. So to support certain return types and parameter types, you first need to declare them. E.g. “public class CheckFunctionBoolFloat : CheckFunctionDelegate<bool, float>” adds a ConditionTask that supports “public bool CheckMe(float value)” methods.

Not as flexible as your one size fits all implementation, but easy enough to use in practice. And in my case adding multi-platform support with a low performance footprint and without any additional memory allocations was far more important than ease of use.

I can send you the code (not sure how, didn’t see an option to pm you on this forum), maybe there is something in it that you can use for your flexible implementation.

Best,
Jakko