Is passing big objects in parameters not performant?

by user129961   Last Updated July 10, 2019 23:13 PM - source

let's say that I have a big main class with a lot of variables, subclasses, etc... in it. Like "IngameScreen"

What if this class is passed as a parameter very often for each frames ? For example there is a "playSound" function in it so every entity need to have this class injected to make a sound.

Does that affects performance ? Or is it something like "it's just a pointer so it costs pretty much nothing" ?

The language is Kotlin

Related Questions

Inner shadow of a polygon in libgdx

Updated September 09, 2018 07:13 AM

Action never fires

Updated June 06, 2019 06:13 AM

How to manage the z-index in two Stage?

Updated December 14, 2017 15:13 PM

Access violation when using shaders in LWJGL 3

Updated January 14, 2018 12:13 PM

Do I need to dispose Pixmap in Actor?

Updated August 14, 2018 12:13 PM