mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Change RID_Owner::get_owned_list.
This commit is contained in:
parent
2d3bdcac35
commit
1a70a06a43
11 changed files with 74 additions and 102 deletions
|
@ -2670,16 +2670,15 @@ bool RendererCanvasCull::free(RID p_rid) {
|
|||
|
||||
template <typename T>
|
||||
void RendererCanvasCull::_free_rids(T &p_owner, const char *p_type) {
|
||||
List<RID> owned;
|
||||
p_owner.get_owned_list(&owned);
|
||||
LocalVector<RID> owned = p_owner.get_owned_list();
|
||||
if (owned.size()) {
|
||||
if (owned.size() == 1) {
|
||||
WARN_PRINT(vformat("1 RID of type \"%s\" was leaked.", p_type));
|
||||
} else {
|
||||
WARN_PRINT(vformat("%d RIDs of type \"%s\" were leaked.", owned.size(), p_type));
|
||||
}
|
||||
for (const RID &E : owned) {
|
||||
free(E);
|
||||
for (const RID &rid : owned) {
|
||||
free(rid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue