TTNNode is an abstract type, and leaves::NTuple{M,TTNNode{T}} is thus a tuple of abstract types? The compiler cannot know how large this abstract type is so it cannot palce it on the stack, and must allocate on the heap to store it.
1 Like