Garbage Collection Question

Blitz3D Forums/Blitz3D Programming/Garbage Collection Question

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Yes, that is what the test was all about.
I believe that if you load a mesh with an inclusive texture, then apply a new brush to it, the inclusive texture is freed.

(1) Load a mesh, with a texture applied to it
mesh = "cube.x" texture = "cube.bmp"
As you said, the texture is loaded with LoadMesh rather than LoadTexture/Brush
(2) Replace the "cube.bmp" file with another file and reload the same mesh.
Now, the second mesh has still the original version of "cube.bmp" applied to it.

However, if you paint the mesh with another, arbitrary brush before reloading the mesh, the new version does appear. This must mean that the original brush was freed.