Print Page | Close Window

Mem leak relating to Populate call

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16217
Printed Date: 29 September 2024 at 11:25am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Mem leak relating to Populate call
Posted By: adrien
Subject: Mem leak relating to Populate call
Date Posted: 17 February 2010 at 4:14pm
Hi all

We have an app that enumerates users in an Active Directory and puts the records in a Report control. There can be any number of objects from 10 to anything. We are currently testing for load with an AD with 250,000 users in it.

Normally we limit the number of records to display, but allow the user to show all. So, I'm running into trouble when adding all 250,000 records to the control.

I'm not using virtual mode.

If I add all records, then call populate, everything is fine (except see nothing for a long time), and memory is released when I call ResetContent.

However if I call Populate while adding records, memory is then not released.

I tried several methods

1. calling populate on each add. This resulted in 0 memory freed when I call ResetContent, and furthermore 0 memory freed when I even delete the control itself!!! So this is a huge leak.

2. Calling populate for every N records. This results in a leak, but there is a small amount of memory returned when ResetContent is called. So this is still a large leak.

I really need all memory to be freed, since this control is in a DLL which can be unloaded, but uses a shared heap, so the memory will leak if it's not returned.

Anything I can do? I'm reluctant to go virtual, since I need sorting and grouping.

What would be really great would be ability for records to be added and no populate call required (e.g. it adds and draws, optimised for high rate of inserts).

Also, there are horrible things happening in AddRecordEx. If you call AddRecordEx with NULL for parent, and -1 for other params, it iterates all items for no purpose. This makes it impossibly slow.





-------------
http://www.wingate.com - http://www.wingate.com



Replies:
Posted By: adrien
Date Posted: 17 February 2010 at 4:15pm
p.s. I've seen this on 14.0 beta, and also 13.1.0 so it's been there for a while.

-------------
http://www.wingate.com - http://www.wingate.com



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