Release RAM

Hi everybody,
How can I release the RAM memory?
I need to import many rows (> 10000) and insert through UDO in two tables (Document and document lines)
I 've tried with:
GC.Collect()
GC.WaitForPendingFinalizers()
after
                    oGeneralService.Update(oGeneralData)
                or
                    oGeneralService.Add(oGeneralData)
but don't work and the precess fail because the RAM has grown too much
What can I do?
Thanks
Carles

We use
GC.Collect()
and that works fine for use... Some people claim that
Marshal.ReleaseComObject
http://msdn.microsoft.com/en-us/library/System.Runtime.InteropServices.Marshal.ReleaseComObject.aspx
is a better way to do it.
It could be that you are on a patchlevel that have memory leaks (happens from time to time) so please check patch-notes for patches that are higher than the one you are running.
Also try to limit the amount of calls to sub-objects... Example
Documents oDoc;
oDoc.Lines.ItemCode = "XXX";
oDoc.Lines.ItemName = "XXX";
is worse than
Documents oDoc;
Document_Lines oDocLine = oDoc.Lines;
oDocLine.ItemCode = "XXX";
oDocLine.ItemName = "XXX";

Similar Messages

  • Photoshop CS4 does not release RAM

    I run Photoshop CS4 on a Windows PC with 4GB. Even though I frequently
    "purge", Photoshop does not seem to be releasing RAM even when all files
    have been closed, often holding on to some 2GB RAM. Only when I terminate
    Photoshop, the RAM it grabbed is released. This means I would have to exit
    and relaunch Photoshop many times a day.
    Any suggestions?

    >the RAM is reused
    Yes but since PS claims the RAM (for very good reasons, I agree) it seems only available to PS itself, so sometimes a plug-in (like PTlens) reports that it doesn't get the RAM it needs. Only one normal camera file is open.
    After relaunching PS it works.
    Sometimes RAM actually seems to get released within a session, why that happens, I don't know.
    I have no problem with PS working this way. I appreciate PS wants RAM that's contiguous and thus doesn't want the O/S to hand it out, but some parts of the workflow call for external plug-ins to join in.
    Rob

  • Releasing RAM otherwise system unresponsive

    Lately I am having a cycle of spinning balls and unresponsive system after doing a few things usually involving MS office applications, Safari and iTunes. The later seeming to be causative, particularly Safari with many windows open. Monitoring memory use I see that the Free Memory is a bit greater than 1/4 and used close to 3/4. It is at this same point each time this problem occurs. I have some times been able to close everything and the memory used remains unchanged. Often I have to restart and a few times had to hard start to clear the problem. A few times the memory reset to show less than a 1/4 of it used. Whenever this happens all things go back to normal. I have 768 MB DDR SDRAM as provided by Apple when this 1.5 GHz PowerPC G4 was bought.
    Ran TechTool 4 Main Memory test said it passed.
    Why does the memory not seem to be releasing and what can be done about it?
    Is there an application that can dump memory from RAM sort of like force quitting what is stored, keeping of course or resetting that necessary for the system?
    Is there some system component relative to allocating and releasing RAM that could be messing-up?
    Is it a matter of some system function running background (I sometimes hear the HD working during this) which is stalling the release of the memory? Hard to monitor as I cannot get Activity Monitor to open at such a time. Perhaps by the time I can, the issue (if there is one to monitor) has passed.
    I know the memory used a result of YouControl memory graphic in the menu bar.
    Thanks
    harmz
    Message was edited by: Harmz

    I am aware that usually it releases as you say, on the fly. But I am trying to troubleshoot those times when it is not releasing and the system is unresponsive with a rainbow ball spinning. Just a moment ago, I closed all applications and showed near to 1/2 of memory used. (more than the ~1/4 at startup). I used and then closed Disk Inventory X while opening Entourage and suddenly memory use dropped to below 1/4 before the 2nd app opened. I see this same level of drop if the system recovers after the above mentioned unresponsiveness. I would not concern myself over these details if I was not getting the unusual unresponsive behavior I described in the first message above.
    Of course any increase in memory is a good thing. But I have been fine with what I've got until this more recent cycle of unresponsive behavior. Unless the problem is in the memory stick, (which I assume it is not though unsure) I expect a clean install will solve the problem. I had hoped to avoid all that work if anyone here has any other ideas.

  • Not releasing Ram

    Hello all,
    My dad has just got himself a nice 20" iMac with the same specs as me with the exception of the HD.
    Been hammering the 20" and it seems to keep the ram "free" much more than mine does. It releases it back and keeps the "free" ram at a much higher level. I am viewing this through the istat pro widget. Any idea how I can see what is hogging all my ram?
    Ryan

    Try using the Activity Monitor app located in your Utilities folder.
    lenn

  • Apple releases Faulty program in Logic 9

    Please note very important posts and test showing conclusive errors with certain plugins at post numbers:
    55
    56
    71
    79
    (This is using Logic 9.1.1 in Snow Leopard 10.6.3)
    Ok, so Logics ram usage has been mentioned many times before, mainly from people who just want to make music and didnt know why they were hitting the "out of memory" message with Logic 9.
    Im not ready to let this drop with Apple and creating a 64bit version of Logic IS NOT the get out card. Currenly Logic is using ram like a poorly programmed Windows application. It has 3 major bugs (these are under 32 bit AND 64bit mode but I will concentrate on 32bit for now)
    1. It uses more ram to load a single instance of a plugin than it did under Logic 8, or than Ableton live does (Anywhere between 300-400 meg of "real" and "virtual" ram for an empty Kontakt 4 instance!)
    2. It uses "real memory" and "virutal memory" in equal doses, which means you dont get the "in theory" limit of 4gb with 32bit, you hit 2gb of both and run out of memory. Ive not seen another application on Mac (apart from Apples also poorly programmed ram management in Safari) which uses real and virtual memory in equal doses as if its working like a Raid 1 arrary!
    3. The biggest problem of all, it hordes ram and then DOESN'T RELEASE IT. (I might add Safari ALSO does this)
    Number 3 is the biggest problem of all, which it never used to do to this degree in Logic 8. A lot of people have experienced the "lack of memory" error, closed Logic and reopened it only to find they had plenty of memory when they refreshed, here is a screen show to prove this massive bug.
    [IMG]coming soon[/IMG]
    In the above example I was testing simply Trilian and Omnisphere with their external server started. Logic was still chewing up ram for each patch I opened despite the data being put into the external server (not the same of course, the external server helped, but Logic was still adding between 10mb and 30mb each to real and virtual ram upon cycling patches). I might also add that the external servers (including Kontakt 4's) load exactly how big the patch is (for instance 1gb will take 1gb of ram) if you use Logic internally to do this It will use more like 1.5gb for a 1gb patch...
    Anyway in the above example I loaded a hand full of patches in both Omnisphere and Trilian and put in one instance of AmpliTube 3 and a Logic channel EQ...already nearly 2gb of ram used!! I removed all the plugins and still this ram is used.
    It should now read 200meg real and 100gb virutal (which is what Logic uses when you first load it with an empty song) - when I quit logic keeping an eye on the activity monitor you'll see the 300meg it should actually be using disappear first and the remaining gb's its hoarding pause for a minute before being properly flushed out of the memory. Very strange but ive noticed Safari does something very similar so whatever Apple are doing its messing up ram usage in both.
    This week im going to run extensive tests, take screenshots and videos on how it handles ram compared to Logic 8 and Ableton Live. All I can do is try to submit them to Apple (somehow?) in the hope they'll fix this problem.
    Now before you say it, at the minute NO 64bit Logic is NOT the answer.
    Why? Because I have hundreds of plugins and only 4 of them are 64bit! in the mean time I CANNOT work only being able to see one 32bit plugin at a time, and have it disappear if I touch the track mixer with my mouse. There are time when I NEED to see 3 plugins at a time working together. I also dont like the floating window and I have a number of plugs where the GUI doesn't even load in the 32bit bridge.
    I think its going to take about a year for all these plugins to be updated and some of my favourites will never be updated (the free plugins such as DFX and MDA which I use for creative purposes)
    But the bigger problem here is that I never ever had problems with memory usage on huge 100+ track projects on my 8 year old G5 which only had 3gb of ram in Logic 7. Now I have a 16gb of ram and a brand new i7 processor It seems I can barely do anything with out worrying about memory usage!
    Another reason 64bit is NOT the answer is because Logic continues to hoard, bloat and not release ram in 64bit mode. Generally users do not have more than 8gb of ram on their system at the minute (infact very few have splurged on the 16gb I have as it costs nearly as much as the entire computer and you get no benefit unless heavily multitasking, which in audio we're not...or everything is 64bit (or everyone release external servers for their sample management)) just because an application CAN make use of 16gb of ram doesn't mean it should...and if Logic continues to chew ram like this its going to eat into ram at an incredible rate (which it already is) and suddenly its 64bit mode when you have 8gb of ram in your system is only going to be as efficient as 32bit Logic 7 was with 3gb of ram!
    Apple needs to do something about this poor ram management, opening and closing a song continually while you are writing or mixing is not helping the work flow at all. These are three HUGE bugs built into Logic and im very surprised a bigger fuss has not been made of these im also disappointed. I probably wouldn't have noticed them had I not been waiting for two months for all my new audio equipment to arrive and had so much time to test and play with Logic and noticed that when not even writing a song and just playing with no more than 4 tracks Id continually run into "out of memory" message. Last night I simply cycled through all my plugins to take screenshots of each (im planning on printing off an A1 poster of all my plugins to give me an easy to view visual look of what is on the system to counter the horrible list of developers names we have to cycle through!) and when I got to the end of list (keeping in mind I still had one track with no plugins on and id just been replacing the plugin with the next on the list) Logic had run out of memory!
    I doubt Apple reads these forums so when ive completed my conclusive research Im going to need a way to get it sent off to Apple properly...any help there?

    Lefire wrote:
    (This is using Logic 9.1.1 in Snow Leopard 10.6.3)
    I suggest you update to 9.1.2, which supposedly fixes precisely some of the things you mention, and 10.6.4.
    Get back to us when you've caught your breath and let us know if it's still happening.
    BTW, from my limited understanding of memory management, it is completely irrelevant whether an app frees up memory while it's still open - it might be beneficial and faster to hang on to it, depending on what you're using.
    The background stuff is irrelevant and rarely subject to a layman's "common sense" - concentrate on whether the stuff you actually work with is working or not.
    And for that, it's 9.1.2 and 10.6.4.

  • Ram issues with FCPX

    I am experiencing an issue where the longer I work in FCPX my RAM is consumed until it shows as a hair-thin slice inside of Activity Monitor, and the performance reflects what I'm seeing in Activity Monitor.  If I close FCPX all my RAM returns and I can re-open FCPX and continue working quickly until I am out of RAM again.  Does anyone else see this?  Is this a "memory leak"?
    I haven't tested this issue on my system at home, but it's happening on my older #GHz Dual Quad eight core.

    Luis, I'm not sure how much RAM your MBP can accept (and actually use) - OWC often suggests that many laptops can accept more than Apple says, however consider this:  The issue I am seeing simply means that if you have more RAM, it just means you will be able to go longer before all of your RAM is tied up, "consumed", than somebody with less RAM.  The issue remains that the programm is not releasing RAM and the longer you edit, the more RAM is off-line until you close FCPX and re-open it, and then all of your RAM will be released and available again.
    I think it is wise to have as much RAM as your software and hardware can use, but having more than that is really not going to benefit your workflow, and it's expensive to have more than you need.  But, again, this doesn't change the issue I am seeing.
    The only other thing I'd like to say is that so far I've used FCP since it came out - after Apple bought it from Macromedia.  I love the application and have finished countless projects in it.  I think FCPX is great in that I've never seen all eight cores tapped as heavily as FCPX can being a 64 bit app.  There are some opportunities to improve it of course, but it's fast and fast seems to be the biggest aspect of a lot of work I do for VailResorts.
    So I'm not against X but I just need to know what is going on with my RAM because after editing for an hour, (I edit all day long) I am not only out of RAM but I begin to get a spinning beachball more often and likely it's due to the missing RAM.  If I forget to reboot FCPX, I will be reminded when I go to "Share" (export) my storyline, (sequence) to H.264 - it takes a long time to begin and it's likely due to the missing RAM.  So for me this is a big issue.

  • After Effects 2014 not releasing memory

    Reposting this issue...
    The latest AE does not release RAM on Yosemite. Have installed Memory Freer app which does release it, but this is a little annoying and an issue from an older version I thought was fixed?
    We are on Mac Pro 5,1, 32gb RAM.

    What is the state of the Reduce Cache Size When System Is Low On Memory preference?
    See this page for details of that preference:
    After Effects CS6 (11.0.2) update

  • Illustrator CS6 uses less then 1GB RAM out of 8GB.

    Here are the specks:
    2.93 GHz Intel Core Duo
    8GB 1067 MHz RAM
    Memory activity:
    Right now Illustrator is using 980MB
    System Memory:
    Free RAM      5GB
    Wired           437
    Active          1.74
    Inactive         877 MB
    Used          3GB
    Virtual Memory Size 170GB
    They boast about Illustrator CS6 using more RAM then 3GB... 3 GB?  Mine uses less than 1GB.
    What can I do to improve this? Thanks

    A script itself wouldn't use much RAM. If you were to open the Activity Monitor, set it to Active Processes and then run the script, you would likely see functions repeatedly using and releasing RAM as the script runs.
    If that is what happens, then Illustrator (and the OS) are doing what they're supposed to; using more RAM as needed and releasing it when done. In which case, there's nothing else you can do to speep up the process as RAM is being allocated as needed.

  • RAM usage

    Hi everybody,
    first of all, regardless that problem isn´t solved yet, thanks very much to Todd for his very detailed problem descriptions. It´s very interesting to understand how AE is handling the memory, with this in mind, it´s way more better to search for the problem´s origin.
    After still getting this and other memory based errors, I downloaded FreeRAMBosster and checked the RAM usage during working on my project.
    After opening the project, there are 17 GB left of 24 GB. Prerendering 4 - 5 seconds causes the free RAM to go down to 8 MEGABYTE.
    The thing is, one, why is that, and two, why won´t I get more free RAM again even after purging everything possible? The system only releases RAM after I shut down AE.
    Currently I´m working on
    Mac Pro
    2 x 2,4 GHz Quad-Core Intel Xeon
    24 GB 1066 MHz DDR3
    After Effects 12.0.0.404
    AE got 21 GB RAM for use, other apps got 3 GB.
    Multiprocessing is OFF.
    Preview resolution is set down to every 16 px.
    Ok, I´ve got an Illustrator document with 40 layers in it which is the basis for the AE project. Maybe this causes the RAM to go down to the ground. But I do not understand why there is no RAM reset in any stage of currently working on a project. Because you won´t have fun during processing, and final rendering is absolutely impossible.
    Thanks for any further input on this.

    Hi Todd and everyone landed here because of the same issues,
    I just figured it out.
    Todd, I didn´t do the update because I wanted to test something first. The problem got something to do with the file link between After Effects and Illustrator. Or maybe it´s just really physically happening that the RAM was overflooded.
    My whole project was based on one single Illustrator document with mutliple layers (ca. 40). I just split it up now scene by scene (f. e. 4 scenes = 4 Illustrator documents with multiple layers within) and relinked the footage in AE to that new documents.
    That did the job!!! AE just got through it like a hot knife through butter.
    A side effect of that was that there were continiously 4 - 5 GB RAM free, so the rendering process was just flowing.
    What I´m still interested in Todd is if there is any RAM reset during working on a project at some stage. I´m finished rendering now and have 3 GB RAM left.

  • Ram utilisation issue

    Please people's fix the ram utilisation issue what is the purpose of 2/gb ram on lenovo a7000 when the phone itself costume 1000 mb ram everytime.
    Phone is slow and lag all the time.

    SQL Server does not release RAM unless the OS issues a memory trim
    because it is running low.
    Just to clear a bit Windows OS never issues memory trim it just sets Low Memory Notification flag ON when there is Low notification. SQLOS has component QueryMemoryResourceNotification which monitors this flag. If it sees flag ON  SQLOS will respond
    by sweeping its caches internally to reduce the process working set, and release memory back to Windows.
    Again if OS feels a great memory pressure then memory allocated Via VirtualAlloc() function will be paged but if SQL Server service account has LPIM this cannot be paged out.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Clearing SQL RAM utilistation.

    Hi
    I have an issue I am trying to resolve related to a number of SQL servers running on a vSphere platform. The issue is around our test platform in which we have a collection of SQL servers that are used occationally and fill up there designated max RAM configuration.
    As an individual server this isn't really an issue. Its when I look at the Host RAM utilisation across the platform that I am trying to reduce. I would imagine there is a fare chance a decent chunk of this is locked up in SQL.
    I know when SQL is restarted the RAM is cleared but I am after a way to do this on the fly without breaking connections from app servers etc. I also can't schedule a reboot or service restart as I cannot guarentee when the DB would be in use.
    My plan was to schedule some sort of repeating task that would clear the RAM usage, once a week maybe that would bring the utilisation down a little bit. I have had a look around but cannot really fined anything.
    Does anybody know of a method to do this? is it even possible without a service restart?
    Thanks
    Steve

    SQL Server does not release RAM unless the OS issues a memory trim
    because it is running low.
    Just to clear a bit Windows OS never issues memory trim it just sets Low Memory Notification flag ON when there is Low notification. SQLOS has component QueryMemoryResourceNotification which monitors this flag. If it sees flag ON  SQLOS will respond
    by sweeping its caches internally to reduce the process working set, and release memory back to Windows.
    Again if OS feels a great memory pressure then memory allocated Via VirtualAlloc() function will be paged but if SQL Server service account has LPIM this cannot be paged out.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Safari is a RAM-eating monster

    I recently upgraded my Mac mini from 4GB RAM to 8GB in the hope of avoiding the constant problem of running out of RAM while using Safari (currently v. 6.0.2). But all it did was postpone the inevitable a bit.
    Activity Monitor just told me that Safari Web Content was using more than 4.6GB of RAM—with no windows open! Plus another 100MB for Safari itself.
    Is it just me, or is this totally insane? Surely the software geniuses at Apple can figure out a way to release RAM when windows are closed! (I asked a developer friend and he said Safari probably has what he called "object-oriented disease". But come on, this is 2012!) My Mac regularly turns into a beachball-spinning slug because Safari is so poorly designed.
    Has anyone done comparisons to see if the other available browsers are more parsimonious with RAM?

    The next time you have the problem, note the exact times when it starts and ends: hour, minute, second.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left.
    Scroll back in the log to the time you noted above. Post any messages timestamped during that interval – the text, please, not a screenshot.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into a message.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

  • How do I get more memory for my Macbook Pro Spring 2010 13-inch with 2.66GHz Intel Core 2 Duo?

    How do I get more memory for my Macbook Pro spring 2010 13-inch with 2.66GHz Intel Core 2 Duo. Apple says no memory currently available for that model. I have 4 GB memory and 3.99 used. Help!

    macette1976 wrote:
    Now I'm confused. This is the one Crucial told me to get:
    CT3309356 - 4GB DDR3 PC3-8500 Unbuffered NON-ECC 1.35V 512Meg x 64
    $45.99
    Also what do you mean that actual memory is 16GB but with Apple it's 8?
    When I go to the "About this Mac" it says Memory 4G 1067 MHz DDR3, then when I go to System Report it says
     Memory Slot
    Bank 0/ DIMM0 2G DDR3 1067 MHZ OK
    Bank 1/ DIMM0 2G DDR3 1067 MHZ OK
    Sorry I'm clueless. Just don't want to buy something that messes up my machine more than it already is.
    The Crucial site appears to have recommended the correct spec 4gB RAM stick for your model. Please note that you will need to remove the existing sticks of RAM to install new, so you will need 2x4gB to get to 8gB.
    When your model of computer was designed/built, it was tested with readily available 2x4gB (8gB). After release RAM retailers have tested it with higher amounts, and Apple didn't update their quoted specs.

  • How to restore after clean install(manually)?

    Hi everyone,
    I had done a clean install from 10.8.5 to 10.9.3, but I do't want using migration assistant to help restore, I just want to restore some data and my account & ID I had typed in the setup screen by myself
    HERE IS WHAT I WANT TO RESTORE:
    Garage band all audio&loop(I don't want download from internet again, my internet is slow..), because last time I restore the app but it showed that i need to download a 1.6gb file for the audio&loop file
    game save
    iTunes song
    Reminder & Note file, I forgot to export the reminder's list, but I don't want to restore the reminder & note app from Time Machine , but just the user file
    AND ALSO:
    How to export and import back iMovie project?- Last time, I just copy the iMovie Project and event folder to my external HDD, but now i put back to movie it say file is missing! And is there any way not to create project and event in my mac's internal hard drive but create everything in external HDD so everything about my video editing will not fill my internal HDD?
    RAM fast to fill up after upgrade to maverick from the trusty mountain lion, is this normal(4gb ram 1600 MHz), some time even some small app(iWork, small game, etc), i using memory clean.
    I forget to download a other copy of mountain lion when my mac was 10.8.5, now i don't see any of it in app store purchase page, but I have a backup in time machine but soon will gone if it fill up, how to download a other copy again? Or how to take out the 10.8.5 in my time machine to become a OS not just a back up of system? If I never click the mountain lion in mac app store, does this mean I never purchase a 10.8 system even my mac early is come with mountain lion?

    Try using the Time Machine application for your selective restore.
    1. You should be able to store all your iMovie projects on the external.
    2. Mavericks normally uses all the RAM to operate faster. Don't use Memory Clean. The OS will release RAM as required.
    3. If your Mac came with Mountain Lion pre-installed, it won't show as a Purchase from the App Store.

  • Mac mini external speaker problems

    my mac mini using an audio interface (Lexicon: Lambda) and linking with external speaker (ADAM: A5x). they can play music and video smoothly before Mavericks update recently.  After the updated, I can't play music and videos with iTunes and youtube smoothly, but it is ok when played with internal speakers.  I had tried to clean up my desktop files, emply trash, and release ram by OnyX, but all these does help, and i don't know wheat to do now,  pls help! Thanks!

    thanks all, I fix my problems finally!
    I just tried the following process and then the probelm solved
    1. turn off mac mini
    2. unplug the usb of my audio interface
    3. then change another usb port at the back my mac mini in order to plug my audio interface again
    4. turn on mac mini
    and it is smooth and fluencent when i play songs and videos on my mac mini now.
    exactly, I don't know why my problem can be solved this way... but anyway...
    this works for me!

Maybe you are looking for