Page 3 of 3

Re: Color picker gui

Posted: Sat Jun 13, 2020 10:11 pm
by Seven
would like to use this control but having some troubles with memory leaks.

simple code to test

IGUIColorPicker* e =new IGUIColorPicker(getGui(), getGui()->getRootGUIElement(), 7);
e->drop();

gives exception on exit without the drop() and leaks memory with the drop().

any help on this?

Re: Color picker gui

Posted: Mon Nov 16, 2020 3:32 pm
by Ovan
Well I don't use irrlicht since 5 years, I don't know how the engine as changed
With a rapid reading it appear that gui elements should be grab on the constructor so I recommend you to add this few lines in the constructor :

Code: Select all

 
            close->grab();
            extend->grab();
            scroll->grab();
            img[0]->grab();
            img[1]->grab();
 
            for(int i = 0; i< 6; ++i)
            {
                tx[i][0]->grab();
                tx[i][1]->grab();
                sb[i]->grab();
            }
 
I will add the modification in my github https://github.com/Phirxian/irrlicht-addons

I hope this will help you
Best regards