i'm having problem with this block of code. It seems to generate a crash and i cannot seem to find it...
Code: Select all
for( u32 k = 0; k < items_.size(); k++ )
{
printf("%s: %i\n",items_[k]->TexFileName,items_[k]->UsageCount);
if (items_[k]->UsageCount == 0)
{
if (items_[k]->Texture) {
items_[k]->Texture->drop();
}
delete items_[k];
items_.erase(k);
}
}
Code: Select all
array< TextureManagerItem* > items_;
Code: Select all
class TextureManagerItem
{
public:
ITexture* Texture;
u32 TexID;
stringc TexName;
stringc TexFileName;
u32 UsageCount;
};
greet
elfuz