MCPcopy Create free account
hub / github.com/defold/defold / FinalCollection

Function FinalCollection

engine/gameobject/src/gameobject/gameobject.cpp:1942–1960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1940 }
1941
1942 static bool FinalCollection(Collection* collection)
1943 {
1944 DM_PROFILE("Final");
1945 assert(collection->m_InUpdate == 0 && "Finalizing instances during Update(.) is not permitted");
1946
1947 bool result = true;
1948 uint32_t n_objects = collection->m_Instances.Size();
1949 for (uint32_t i = 0; i < n_objects; ++i)
1950 {
1951 Instance* instance = collection->m_Instances[i];
1952 if (instance != 0x0 && instance->m_Initialized && ! FinalInstance(collection, instance))
1953 {
1954 result = false;
1955 }
1956 }
1957
1958 collection->m_Initialized = 0;
1959 return result;
1960 }
1961
1962 bool Final(HCollection hcollection)
1963 {

Callers 3

DeleteCollectionsFunction · 0.85
DeleteCollectionFunction · 0.85
FinalFunction · 0.85

Calls 3

FinalInstanceFunction · 0.85
assertFunction · 0.50
SizeMethod · 0.45

Tested by

no test coverage detected