Did you profile it? See
The Juno profiler will tell you which lines of code are allocating. @code_warntype can help you figure out if it’s an inference thing.
@code_warntype