web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

List class consume all most all memory like memory leak

(0) ShareShare
ReportReport
Posted on by

Hi all,

My problem is when I using list/set in a class, it consume lots of memory, say 20 GB just like memory leak but I cannot find the reason.

My code is like the following,

List ItemSetList= new List(Types::Class);

Set ResultSet = new Set(Types::Record);

ListEnumerator ItemEnumerator ;

Result          _result;

;

[some process to query list]

ItemEnumerator=ItemSetList.getEnumerator();

while (ItemEnumerator.moveNext())
{
      _result=ItemEnumerator.current();

if(...)

{

ResultSet.add(_result);

}

}

During the execution, I found the RAM consume dynamically. When the resultSet has only 3000 record, the RAM consumption can reach 20 GB. I am quite confused about where have the momory gone. Any suggestion is appreciated. Thank you~!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    If you can reliable reproduce the problem, it will be great if you report it to Microsoft, so they can fix it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans