Questions tagged [memory]
The memory tag has no summary.
117 questions
0
votes
0
answers
43
views
Unable to determine cause of memory leak in Unity when using Addressables. Can anyone give suggestions on what the cause might be?
I'm creating a simple bullet hell game for Android and I ran into an issue when diagnosing my game using the Memory Profiler where memory usage was increasing after each play-through. I had calls to ...
0
votes
1
answer
82
views
Is memcpy safe to use to fill an ID3DBlob with a pre-compiled shader?
Following my post Saving shaders to file I then tried to load shader object files to recreate my shaders.
I found some Q&A about how to load precompiled HLSL shaders into memory, including a short ...
0
votes
0
answers
99
views
Browser memory increasing the longer Unity WebGL build runs
I have an app in Unity WebGL that should run for a long time (a few days) without stopping. One issue I notice is that, the longer the app runs the browser memory usage gets bigger. Is this related to ...
0
votes
1
answer
130
views
Why does this function cause memory leaks?
I'm trying to make a pickup and drop script by myself and every time the game calls the pickup function, it seemed to cause memory leaks and freezes the game for few seconds.
After those few seconds, ...
1
vote
0
answers
89
views
What causes the Garbage Collector to spike and drop the framerate here?
I'm trying to optimize my first game project. It reaches between 55-60 FPS while playing, but there is a problem. As in the screenshot, the Garbage Collector section sometimes causes increases. This ...
1
vote
1
answer
224
views
I am testing the flyweight pattern on thousands of GameObjects but its not helping save memory. What am I doing wrong here?
I am trying to understand the flyweight pattern better by trying to optimize memory usage by spawning 10000 copies of an enemy GameObject that I have which has an Animator component, SpriteRenderer ...
0
votes
2
answers
302
views
Stray (orphaned) nodes remain after queue_free() of their parent scene
Godot 4.2.1
I have implemented a simple scene-save system:
The Savegame Autoload listens for the S key press.
When S is pressed, the ...
1
vote
1
answer
323
views
Creating a Renderer class using SFML
I currently have a Renderer class, which as in the example code, looks like this:
...
1
vote
0
answers
2k
views
Untracked memory in Unity's Profiler
I am working on doing a memory optimization pass on a fully developed game on Unity2021.3.16f1. I am trying to figure out what's the pain point and for that, I need help.
Before sharing the profiler I'...
2
votes
1
answer
1k
views
How to prevent memory hacks?
For cheating or maybe just making some trainers, it's possible for hackers to read and update variables directly in the game's memory.
Is this something that can simply be prevented, or is the answer ...
3
votes
1
answer
4k
views
Rotating a Unity Texture2D 90/180 degrees without using GetPixels32 or SetPixels32? (To avoid heap fragmentation)
I have a script which is loading a photo from path into a texture (photoThumbT2D), then rotating it:
...
0
votes
0
answers
595
views
Directx12 command list reset close memory leak
I simply reset and close the command list but my memory usage goes up 5 gb per second.
This is the simple list of things I do
Reset command buffer
Close command buffer
Reset command allocator
I feel ...
0
votes
0
answers
242
views
Unity sprite takes 5 times more memory in profiler
So as stated I have a sprite that when compressed takes 2 MB. But when I look into the memory in the profiler, it says that the sprite uses 10 MB! This happens both when I profile in the unity editor ...
4
votes
1
answer
1k
views
Should you avoid memory allocation and deallocation while the game is running?
I recently read this answer on this site, which says the following:
making sure no allocation/deallocation is being done while the game is running is a golden rule of thumb.
I interpret this as ...
0
votes
2
answers
701
views
If I create a prefab out of an object on scene will my game take more memory in Unity?
If I create a prefab out of an object on scene will my game take more memory in Unity?
I have 30 enemies on my scene. I created a prefab for every one of them. I am going to use each of the created ...