using (var s = Session.Open(domain))
            {
                using (var ts = Transaction.Open())
                {
                    for (int i = 0; i < 100000; i++)
                    {
                        var de = Query.All<DocEntity>().Single(d => d.SysName == "Control");
                        var r2 = new Role(Guid.NewGuid()) { Name = "rrr" + i };
                        var p2 = new FunctionalPermission(Guid.NewGuid())
                                     {
                                         FullControl = true,
                                         Read = false,
                                         Delete = true,
                                         Name = "q" + i,
                                         Entity = de,
                                         Role = r2
                                     };
                    }
                }
            }

Running this code will constantly increase memory usage. I've attached tescase + one more test, to show inproper exception during query.


Updated at 05.08.2010 5:50:51

Even if I add

if (i % 100 == 0)
                        {
                            GC.Collect();
                        }

It still grows, but much slower

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Aug 05 '10 at 05:45

xumix's gravatar image

xumix
425757682

edited Aug 12 '10 at 09:40

We'll study the issue shortly, thanks for comprehensive report.

(Aug 05 '10 at 05:45) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

Issue created: http://code.google.com/p/dataobjectsdotnet/issues/detail?id=796

answered Sep 03 '10 at 16:25

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×573
×11

Asked: Aug 05 '10 at 05:45

Seen: 3,763 times

Last updated: Sep 03 '10 at 16:25

powered by OSQA