Print Page | Close Window

Gallery.Items.Icons.RemoveAll() works incorrectly

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9665
Printed Date: 17 June 2025 at 6:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Gallery.Items.Icons.RemoveAll() works incorrectly
Posted By: San0k
Subject: Gallery.Items.Icons.RemoveAll() works incorrectly
Date Posted: 22 February 2008 at 7:30am
Hello,

I need dynamicly update images in gallery.
I use for do it this code snip:
                            Gallery.Items.Icons.AddIcon(icon.GetHicon().ToInt32(), item.Id, XTPImageState.xtpImageNormal);

Before it I call RemoveAll() method of Icons collection, which really remove icons from collection (Count equals zero).

BUT!
When I look on Windows Task Manager "GDI Objects" column I view constantly growing value of objects. And when this value reach a 9 999 objects - application crash!
All other references correctly disposed.
Growing occur at AddIcon() string.



QUESTION:
How I can correctly remove Icons???



Replies:
Posted By: Oleg
Date Posted: 22 February 2008 at 9:10am
Think you need release your icon.GetHicon also.
 
If you don't have 11.2.2 release I very recommend you update. See release notes for ImageManager.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: San0k
Date Posted: 22 February 2008 at 11:20am
Thanks.

I have use AddBitmap() method instead AddIcon() and bitmap to icon convertion.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net