I'm pretty sure - though this is all from memory - that the GetBrush() stuff was added much later after frequent requests from people. I'm also pretty sure that there were discussions that using it caused memory to be allocated, indicating that the brush was being created or copied from the original. That you were, in fact, not getting the original brush back.
Test it to be sure, but I'm pretty sure freeing a brush won't free anything attached to it. Again, don't take this as gospel, but I'm pretty sure you can think of brushes as something like this :
Apologies if my syntax is a bit off there, it's been ages since I did any B3D. Anyway, what that's supposed to illustrate is that it's really no more than a wrapper for your Entity commands. I'd be VERY surprised if it freed a texture when the brush was freed. I think it's just a bunch of fields storing anything you send to it and then when you paint with it, it triggers all the entity commands you would have used.
You'd need Mark or Simon, or perhaps just someone a bit smarter than me to confirm this, but I think this is how it works. Ironically, I never used brushes when I was coding with B3D and now that I'm coding with BlitzMax and TV3D, I've invented my own brush class encompassing everything the B3D brushes encompass and several other things like lights and shaders which B3D doesn't actually have, but might be well be in brushes if it did.
Test it to be sure, but I'm pretty sure freeing a brush won't free anything attached to it. Again, don't take this as gospel, but I'm pretty sure you can think of brushes as something like this :
Type Brush Field Tex1:Int Field Tex2:Int Field Tex3:Int Field Tex4:Int End Type PaintEntity(Entity,Brush) Function PaintEntity(E,Brush) EntityTexture E,Brush\Tex1,0 EntityTexture E,Brush\Tex2,1 EntityTexture E,Brush\Tex3,2 EntityTexture E,Brush\Tex4,3 End Function
Apologies if my syntax is a bit off there, it's been ages since I did any B3D. Anyway, what that's supposed to illustrate is that it's really no more than a wrapper for your Entity commands. I'd be VERY surprised if it freed a texture when the brush was freed. I think it's just a bunch of fields storing anything you send to it and then when you paint with it, it triggers all the entity commands you would have used.
You'd need Mark or Simon, or perhaps just someone a bit smarter than me to confirm this, but I think this is how it works. Ironically, I never used brushes when I was coding with B3D and now that I'm coding with BlitzMax and TV3D, I've invented my own brush class encompassing everything the B3D brushes encompass and several other things like lights and shaders which B3D doesn't actually have, but might be well be in brushes if it did.