Canvas and memoryHi,<br/> I am using a canvas to add some UIElements to it(The canvas represents a report page).Every time I create a new page and add some controls to it the memory grows.I tried to call the GG.Collect method but it doesn't free the memory.<br/> <br/> My context is the following :I have a XpsDocumentWriter in <span>which I put pages(every page is a canvas).<br/> <br/> Do you have any solutions to my problem?<br/>  <br/> <br/> </span>© 2009 Microsoft Corporation. All rights reserved.Fri, 31 Jul 2009 10:21:53 Z09992766-9664-4924-8ab9-de816a037246http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/09992766-9664-4924-8ab9-de816a037246#09992766-9664-4924-8ab9-de816a037246http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/09992766-9664-4924-8ab9-de816a037246#09992766-9664-4924-8ab9-de816a037246Cosmin_Rasinahttp://social.msdn.microsoft.com/Profile/en-US/?user=Cosmin_RasinaCanvas and memoryHi,<br/> I am using a canvas to add some UIElements to it(The canvas represents a report page).Every time I create a new page and add some controls to it the memory grows.I tried to call the GG.Collect method but it doesn't free the memory.<br/> <br/> My context is the following :I have a XpsDocumentWriter in <span>which I put pages(every page is a canvas).<br/> <br/> Do you have any solutions to my problem?<br/>  <br/> <br/> </span>Sat, 04 Jul 2009 07:38:48 Z2009-07-04T07:39:42Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/09992766-9664-4924-8ab9-de816a037246#b8cab485-9b97-4132-bb83-3e68c21bde20http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/09992766-9664-4924-8ab9-de816a037246#b8cab485-9b97-4132-bb83-3e68c21bde20Kenneth Hauglandhttp://social.msdn.microsoft.com/Profile/en-US/?user=Kenneth%20HauglandCanvas and memoryCant you do this on one canvas, and draw rectangles for each page? It is hardly supprising that more controls increases the memory usage, with all the handles each control has.<hr class="sig">KennethSat, 04 Jul 2009 21:17:23 Z2009-07-04T21:17:23Z