EDIT: @Sin; Try this. It has the deleters. If your FPS still drops, I can't think of anything else that would cause that. Simply because there isn't anything to delete or clean or leak at all.
[ATTACH=CONFIG]22039[/ATTACH] <– Plugin with deleters. Let me know if it helps with that FPS problem. Otherwise I'll have to view that script you're running and the Smart include. I'm pretty sure I freed all Smart's targets. Only time that Smart won't free it is if you forcefully terminate some script.
I'll sort it out.. I just wrote some deleters for everything. If this works, then it's the plugin. If it does not work, then it is not the plugin and I wasted my time lol.
We'll have to see. The code for any curious eyes:
void Hook_glDeleteBuffers(GLsizei n, const GLuint* buffers)
{
for (int I = 0; I < n; ++I)
{
ModelBuffer::Buffers.erase(std::remove_if(ModelBuffer::Buffers.begin(), ModelBuffer::Buffers.end(), [&](const ModelBuffer &B) {return B.ID == buffers[I];}));
}
ModelBuffer::Buffers.shrink_to_fit();
ptr_glDeleteBuffers(n, buffers);
}
void Hook_glDeleteLists(GLuint list, GLsizei range)
{
for (std::size_t I = list; I < list + range; ++I)
{
Font::Fonts.erase(std::remove_if(Font::Fonts.begin(), Font::Fonts.end(), [&](const Font &F) {return F.ID == I;}));
}
Font::Fonts.shrink_to_fit();
ptr_glDeleteLists(list, range);
}
void Hook_glDeleteTextures(GLsizei n, const GLuint *textures)
{
for (int I = 0; I < n; ++I)
{
Texture::IDMap.erase(Texture::IDMap.find(textures[I]));
Texture::Textures.erase(std::remove_if(Texture::Textures.begin(), Texture::Textures.end(), [&](const Texture &T) {return T.ID == textures[I];}));
}
Texture::Textures.shrink_to_fit();
ptr_glDeleteTextures(n, textures);
}
//In wglGetProcAddress:
if (FunctionCalled == "glDeleteBuffersARB")
{
xDetour(ptr_glDeleteBuffers, ptr_wglGetProcAddress(lpszProc));
return reinterpret_cast<int (__stdcall *)()>(Hook_glDeleteBuffersARB);
}
else if (FunctionCalled == "glDeleteLists")
{
xDetour(ptr_glDeleteLists, ptr_wglGetProcAddress(lpszProc));
return reinterpret_cast<int (__stdcall *)()>(Hook_glDeleteLists);
}
else if (FunctionCalled == "glDeleteTextures")
{
xDetour(ptr_glDeleteTextures, ptr_wglGetProcAddress(lpszProc));
return reinterpret_cast<int (__stdcall *)()>(Hook_glDeleteTextures);
}
Just have to detour them and I'll upload a dll on the official thread.