Memory Leaks (Super Basic) | Godot Basics Tutorial | Ep 21

preview_player
Показать описание
Welcome to the Godot Basics Tutorial Series, in this episode we take a soft and basic introduction into memory leaks and a brief look into object pooling (super brief, take a better look at it towards the end of the series).

Godot Tutorials
----------
🌸 Website:

🐦 Twitter:

Resources
----------
🎮 Godot Game Engine Tutorial Series:

💻 GDScript Fundamental Tutorial Series:

🐥 Trello Page with other Godot Channels:

In this episode we cover the following:
- Garbage Collection (Simple Terminology)
- Brief Look at Garbage Collection Advantages/Disadvantages
- Brief/Simplified Theory looking into Object Pooling (Object Pool Pattern)

Godot Tutorials aims to teach beginners how to get up and running with basic game programming skills.
Рекомендации по теме
Комментарии
Автор

So there's something I'd like to get some clarification about which is how object pooling is more optimal than queue free? Now, here's my thought process:
The case in which object pooling could indeed be more efficient than queue free is if said object was going to be "adopted" in the scene again, as having that orphaned object in the pool ready to be put back on screen is faster than having to re-write it to memory after completely wiping it off. But if that was not going to be the case, killing a single enemy object on the scene for example, then queue_free() is essentially the most optimal way to go about memory management, correct? Again, awesome series, I have your playlist saved because I know for a fact that I'll return to it many times for reference lol!

ezzygd
Автор

When u added godot to the scene that made me laugh, that just made my day

mny
Автор

wow I never thought about object pooling to manage memory in machine. thanks for your explanation, this channel really worth more subscriber.

ferdikadatu
Автор

2:30 for those of you who are coming back to this great resource in the year 3000, Godot has evolved alot since 2020/2021, however, Unity used to be 'better' than Godot due to its' closed source, massive file sizes and inability to run on low-end computers. Since then, the dev community has matured and Unity is non-existent leaving Godot at #1

aiyushg
Автор

I don't know why you don't have more subscribers, your tutorials are amazing and I'm learning a lot with them! I'm really excited to see more!

darutonsousa
Автор

About object/node-pooling, I'd point out, that _ready is not called when re-adding a node, and that the node is basically in the same state as it was, when it was removed -> Unless we also do some re-initialization this might lead to (for example) adding already dead enemies :)

nosdregamon
Автор

As a complete noob programmer, memory management was not something I would ever thought to take care of and it is important.

mladd
Автор

As always great video I knew all of that yet I still found it clarified things in my mind more

FeniksGaming
Автор

After hearing about Object pooling and it's advantage vs queue free, i think i can use this technique to enable mobs to respawn after a few seconds after being killed in the same scene. It can probably be done by using queue free aswell but object pooling seems better and easier to imagine in my head. ThoughtCoding if that's what it's called.

localhermitph
Автор

Now I first like your videos, and then I watch them, because I know the content is good.

andermetalbrasil
Автор

can function change_scene_to() make memory leak?

TEPAANT
Автор

How does this interact with C#? What objects will C#'s garbage collector clean up, and which ones must be manually freed?

FalconFetus
Автор

I don't know if my issue is pertinent here... but only in one of the 4 stages I have made for my game, when I close the game in debug mode, the console says this:

ERROR: Condition "_first != nullptr" is true.
at: ~List (./core/self_list.h:108)
ERROR: Condition "_first != nullptr" is true.
at: ~List (./core/self_list.h:108)
WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
at: cleanup (core/object.cpp:2064)
ERROR: Resources still in use at exit (run with --verbose for details).
at: clear (core/resource.cpp:417)

I have tried to re-make the stage from the beginning, but it always give me the same error.
What does, in particular, the Warning message mean? what is --verbose for details?

Thank you

lucapietrosanti
Автор

What about `Resource` - aren't they refcounted, hence susceptible to garbage collection issues?

BartoszBielecki
Автор

cool ! though i can hardly understand ....but i think it's very important

cmds.learning
Автор

hey DR .Godot Tutorials, i want to hide some object in my scene whrn camera far away, how can i do is best? hide them? then set visable, or load them when player near them?or other way?

cmds.learning
Автор

The color red doesnt exist in my world.

luciferpyro
welcome to shbcf.ru