I’m looking at building a custom version of the distributedNode code for the game I’m working on, but for debugging purposes I was hoping there would be a way to see how large a given datagram is.
Any ideas on how to do this? Or more specifically, how to measure how much memory a variable/object in general uses?
The reason I’m asking is I want to keep an eye on how big a datagram gets if I start blasted it out, because I’m worried some of them might get a bit larger. (i.e. if the data I’m sending out consumes 1MB of memory I’ve got a big problem).
But there’s not a general way to ask how much memory any object consumes. That’s impossible because each object could store its information in a different way (and not all of it is stored within the object itself).