473,856 Members | 1,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

lots of GDI objects

Hi,

i'm experiencing a very weird problem here.
I've got a ListView, 4 columns and about 300 items. Nothing to worry about
there.
Now when I scroll up and down repeatedly using the vertical scrollbar, I see
the number of GDI object grow rapidly. Now and then it drops again to about
60 which is reasonable.When this number reaches 10.000, all of a sudden, it
turns into 4.294.964.397 (more or less).
Running the garbage collector manually does not help anymore then.
I also noticed that when I run the garbage collector (manually) *before* the
number reaches 10.000 this problem does not occur.
What is going wrong here ? I'm not doing any custom drawing, I don't even
use another backcolor, font or whatever. Why does it allocate so many GDI
objects. If I wrote something like a ListView, I would cache some or all of
the pens and brushes, as in most cases all the rows have similar properties
(color, font, ...).

I must be missing something. Anybody a clue ?
Thanks in advance.
Greetings,
Bram.
Nov 16 '05
10 3498
There's a known bug in the performance counter object for GDI handles (which
is used by taskman), once the max value (10000)is exceeded it returns a
bogus number.

Willy.
"Bram" <bv*****@nospam .skynet.be> wrote in message
news:40******** **************@ news.skynet.be. ..
Hi,

There's a GDI Objects column for every process in task manager, I suppose
they are what they are.
Never seen anything wrong when there was nothing wrong.
Over years I have found these numbers very accurate. Why shouldn't they
not
be.
I suppose there might be a small bug in Task Manager, or in some kernel
function causing the number to go insane when it passes 10.000. Which
doesn't mean there is actually going something wrong in the GDI system.

But this doesn't explain why my listview is rapidly allocating so many gdi
objects while scrolling.

Cheears,

Bram

"codymanix" <no************ ****@gmx.net> wrote in message
news:%2******** *******@TK2MSFT NGP12.phx.gbl.. .
> I'm using the task manager. Is it that inaccurate ?

No I was just curious. But how can you be sure they are GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk


Nov 16 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1098
by: Mickel Grönroos | last post by:
Hi everybody, This is a question about Tkinter.Canvases and performance: I am writing a Tkinter application that among other things contains a number of Tkinter.Canvases that in turn hold rectangle and text objects that can be moved along with clicking and dragging the mouse. Everything works fine and well when I have just a few of these objects on the canvases, but when the number of objects on the canvases grow over a thousand, the...
10
1793
by: AlexS | last post by:
Hi, I wonder if anybody can comment if what I see is normal in FW 1.1 and how to avoid this. I have .Net assembly, which creates literally thousands of temporary strings and other objects when running. Usually it is something like { string s=some value; some local processing here
5
1423
by: Simon | last post by:
Hi all, I'm hoping that someone could help with the following general question: I'm making a website that manages beta releases of software. It does various things like store bugs, comments, work arounds and feature requests. Users can subscribe to be notified if a feature or bug is detected in their area of interest. The software developer can publish new and polls and all sorts of crap like
18
3070
by: Matthias Kaeppler | last post by:
Hi, in my program, I have to sort containers of objects which can be 2000 items big in some cases. Since STL containers are based around copying and since I need to sort these containers quite frequently, I thought it'd be a better idea to manage additional containers which are initialized with pointers to the objects in the primary containers and sort those (only pointers have to be copied around then). However, that also means if I...
2
2014
by: Chris | last post by:
Hi, I am building a single webform/webpage asp.net application using VB.NET. I have created lots of classes for this web application. On page load I use a facade controller pattern class to perform all my initial class object instaniations using sub new() procedures I'm using this project to learn the ins and outs of OOA and OOD, so instead of doing everything in code behind pages I have lots of objects now created
8
1953
by: vvenk | last post by:
Hello: I just wrote my first ASP.Net application. It worked fine on my machine and when I put into production, the ASP.Net process reaches 50% quite fast and then the system does not work anymore until I kill that process. Obviously, this is not acceptable. Looking back, I do not destroy any objects in my form. Would that be the reasn why the application breaks down?
2
47013
by: wlevine | last post by:
Can someone give me an example of how to construct an array of objects? for example, I have: function objFacility(id,name,adr,city,state,zip) { this.id = id this.name=name this.adr=adr this.city=city this.state=state this.zip=zip
8
1946
by: rpsetzer | last post by:
I have to create a big web application and I was thinking of using a data layer. For each entity in the database, I'll define a class that maps the table structure, having sub-objects for each foreign key, having insert/delete/update methods, the usual deal. Yet, I am very concerned about performance. For example, there are lots of cases when I may just be needing the employee name. Yet using this model, I will have to instantiate an...
10
9091
by: Tigger | last post by:
I have a method that is passed two objects and it needs to return an object that represents those two objects multiplied together. public object Multiply(object a, object b) { return a * b; } The objects can be any type of number and I would like it to do the maths in the most efficient and accurate way.
12
3609
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a gridview, for example, I loop through a datareader, populating an array list with instances of a custom class in the middle tier, and then send the array list up to the presentation layer and bind the gridview to it. If I use a typed dataset, I...
0
9767
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11081
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10806
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10394
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9544
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7939
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5967
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3214
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.