New topic: 

Memory used for graphics - Carbon vs Cocoa

<http://forums.realsoftware.com/viewtopic.php?t=48005>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        MikeD          Post subject: Memory used for graphics - Carbon 
vs CocoaPosted: Tue May 28, 2013 10:56 pm                         
Joined: Sun Jul 16, 2006 11:40 am
Posts: 3
Location: Peoria Illinois                I have a program that loads photos, 
creates and displays thumbnails.  It runs much slower when compiled as a Cocoa 
app ... I understand Cocoa may not be fully optimized, and that's fine for now. 
 However in Cocoa the program will run out of memory and quit.  In Carbon it's 
fine.  (RB2012-2 on a new mac pro with 12 gig memory)

I loaded the activity viewer utility to watch what's happening to memory as 
they execute.  In Carbon it'll load 650 thumbnails and says it uses about 200 
meg of real memory.  Compiled in Cocoa, trying to open the same 650 it runs the 
memory up to a little over 3 gig and then quits after making about 500 
thumbnails.

I sure hope Cocoa is more efficient with graphics when the new version of Xojo 
is out next week.

Thanks, Mike   
                             Top                tomis          Post subject: 
Re: Memory used for graphics - Carbon vs CocoaPosted: Wed May 29, 2013 2:02 am  
                               
Joined: Thu Jul 27, 2006 6:31 pm
Posts: 1695
Location: Monterey, CA                It sounds like you've found a memory leak 
of some sort. If you can isolate the issue in a new project then report it via 
the Feedback system so they can fix the specific problem.

I'd start by seeing what happens if you were to clear all reused variables 
before moving to the next file.

ie;
for each f in listOfFiles
  p=Picture.open(f)
  // do something with p
  p=nil
next
      
_________________
ImagePlay Effects Library (40+ image effects in one open source module. No 
plugins, no dependencies, no restrictions.)
http://imageplay.sourceforge.net/  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to