How to restore system RAM memory when i run DI batch job process

How to restore system RAM memory when i run DI batch job process
I use SAP-B12005SP53 and i develop with Business Partner Object

HI ALL
TAKE CARE: Nothing was working in VB6, but in .NET it sets the default value !
from help of VS.
When you assign Nothing to an object variable, it no longer refers to any object instance. If the variable had previously referred to an instance, setting it to Nothing does not terminate the instance itself. The instance is terminated, and the memory and system resources associated with it are released, only after the garbage collector (GC) detects that there are no active references remaining.
Garbage Collector distroyes the objects at the end of the sub of function, not in the loop.
So use local variables when you loading the 7000 items. For me working fine and i do not have a memory problems. I am loading 50000 items with prices from EDI file, and memory usage stops at 120MB.
1st solution  create a sub or a function to populate the data, and run this for every items by as single rutin,
  sub x
    Dim obj As New Object()
        Try
... put here your update code
        Catch ex As Exception
        Finally
            GC.Collect()
        End Try
  end sub
This free up the memory when Garbage
2nd solution: use inner loop definition
  sub x
Try
            Do While True
                Dim obj As New Object()
            Loop
        Catch ex As Exception
        Finally
            GC.Collect()
        End Try
  end sub
This free up the memory inside the loop.
I recommend to use Friend Class keyword for your addon declaration and do not use modules.
Modules and shared classes will be free up the memory when your program terminates execution.
For more information see MSDN help http://msdn.microsoft.com/en-us/library/7ee5a7s1(VS.80).aspx
and http://msdn.microsoft.com/en-us/library/0x9tb07z(VS.80).aspx
Regards,
J
Edited by: János Nagy on Oct 15, 2009 2:17 PM

Similar Messages

  • How to restore back my contact when I accidentally delete on iCloud

    How to restore back my contact when I accidentally delete on iCloud

    Basics of File Recovery
    Files in Trash
    If you simply put files in the Trash you can restore them by opening the Trash (left-click on the Trash icon) and drag the files from the Trash to your Desktop or other desired location.  OS X also provides a short-cut to undo the last item moved to the Trash -press COMMAND-Z.
    If you empty the Trash the files are gone. If a program does an immediate delete rather than moving files to the Trash, then the files are gone.  Recovery is possible but you must not allow any additional writes to the hard drive - shut it down. When files are deleted only the directory entries, not the files themselves, is modified. The space occupied by the files has been returned to the system as available for storage, but the files are still on the drive. Writing to the drive will then eventually overwrite the space once occupied by the deleted files in which case the files are lost permanently. Also if you save a file over an existing file of the same name, then the old file is overwritten and cannot be recovered.
    General File Recovery
    If you stop using the drive it's possible to recover deleted files that have not been overwritten by using recovery software such as Data Rescue II, File Salvage or TechTool Pro.  Each of the preceding come on bootable CDs to enable usage without risk of writing more data to the hard drive.  Two free alternatives are Disk Drill and TestDisk.  Look for them and demos at MacUpdate or CNET Downloads.
    The longer the hard drive remains in use and data are written to it, the greater the risk your deleted files will be overwritten.
    Also visit The XLab FAQs and read the FAQ on Data Recovery.

  • HT1338 my mac is running 10.5.8, I bought a new Nano, itunes is prompting me to get the current itunes, but my mac will not take it, states I need 10.6.8.  How do I get that?  When I run a software update, system says there is none.  Help

    my mac is running 10.5.8, I bought a new Nano, itunes is prompting me to get the current itunes, but my mac will not take it, states I need 10.6.8.  How do I get that?  When I run a software update, system says there is none.  Help

    Click here, check that your computer meets the requirements, buy and install the DVD, and then run Software Update.
    (73181)

  • How to restore a dropped table when recycle bin is purged??

    how to restore a dropped table when recycle bin is purged??

    You should be asking general database questions in General Questions - and not in the Objects forum.
    Restoring a dropped table means restoring a logical or physical backup of that table.

  • How to restore a previous sesstion when Firefox crashes

    How to restore a previous sessions, when Firefox crashes?

    Usually, Firefox restores automatically the previous session at startup when it crashed. If not, try History menu -> Restore previous session.

  • HT4061 how to restore the iphone 4 when you get a restore message error (-1)?

    how to restore the iphone 4 when you get a restore message error (-1)?

    If the iPhone was jailbroken, you get this error due to baseband mismatch. No help for such iPhones here in this forum.
    if not, Restore on another computer. If error persists it is hardware failure.

  • How to restore System Preferences's lock icon?

    How to restore System Preferences's lock icon? My Mac's System Preferences's lock icon at the  lower left corner disappeared, how to restore?

    The solution is in this 5 Feb 2014 post by Dio Gratia:
    "Go to the Security& Privacy System Preferences Pane, click the lock icon, authenticate and hit the Advanced button.  Check the Require an adminstrator password to access system-wide preferences, hit Okay.
    The lock icon will show up again on the Sharing Preference Pane.  It should cure the missing lock icon in general."
    See
    Re: No lock in the preference pane???

  • How do I remove the hover when I run the click of a second button?

    Good Morning,
    I found half the solution to my problem, that is, the part about the hover state to click on the button:
    1) I converted my Button in ToggleButton
    2) I have added this Style based Triggers:
    <Style TargetType="ToggleButton" x:Key="checkedToggle">
    <Style.Triggers>
    <Trigger Property="IsChecked" Value="True">
    <Setter Property="Background" Value="#5fc3f3"/>
    </Trigger>
    </Style.Triggers>
    </Style>
    To click the button keeps the "hover", the second click will remove.
    Now the other problem: how do I remove the hover when I run the click of a second button?
    Thank You.

    >>Now the other problem: how do I remove the hover when I run the click of a second button?
    You simply set the IsChecked property of the first button to false when the second button is clicked:
    <ToggleButton x:Name="firstButton" IsChecked="True" Style="{StaticResource checkedToggle}">...</ToggleButton>
    <ToggleButton Checked="ToggleButton_Checked" Unchecked="ToggleButton_Unchecked">...</ToggleButton>
    private void ToggleButton_Checked(object sender, RoutedEventArgs e)
    firstButton.IsChecked = false;
    private void ToggleButton_Unchecked(object sender, RoutedEventArgs e)
    firstButton.IsChecked = false;
    Please remember to mark close your threads by marking helpful posts as answer and please start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • How to solve  problem :- rep-188-Report Server acccepts only Batch jobs

    How to solve problem :- rep-188-Report Server acccepts only Batch jobs
    Report server :- 10gR1

    Hello,
    Could you give us some details about the command line ?
    What is the value of DESTYPE ?
    Regards

  • How to run a bAtch Job

    Hello ,
    How can I run a batch job (java class) that will update my jsp page with newly added entries from table in database.In short, i want to run a batch job which updates drop down list in jsp page every time any update happens in my table in database.
    Can anyone help with sample code?
    Thanks in advance.

    and my application is a webservice which runs on Tomcat

  • How to restore system databases?

    If SQL server system databases crash, what will happen?
    If sql server system databases crash, how to fix the issue? Any difference to fix for master, msdb,model temp and distribute?
    Thanks

    There would be various situation after "crash".
    If Master database has corruption after unexpected failure then SQL Service won't start. Only option would have is to rebuild system databases and follow the article given by others to restore system databases.
    If SQL Service is able to start and reports corruption in model database then there are two ways to fix it.
    Get MDF and LDF file of model from other SQL Instance which has EXACTLY same build and replace the files.
    If you have important data in model database, then you would need to restore. Follow the links given by other
    TempDB database is not eligible for backup and restore.
    MSDB database can be restored if SQL is running.
    Distribution database can be restored when SQL is running. Provided no one accessing it.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • How to restore system to an earlier date

    How do I restore system to an earlier date

    Hi Ronda,
    If you don't have a backup, you can't really, about the only  other way is a relatively painless Archive & Install, which gives you a new/old OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space and no Disk corruption, and is relatively quick & painless...
    http://docs.info.apple.com/article.html?artnum=107120
    Just be sure to select Preserve Users & Settings.

  • How can I upgrade RAM memory for Pavilion dv6-3267cl notebook PC?

    My laptop is HP Pavilion dv6-3267cl Entertainment Notebook PC 
    and OS is Windows 7 Home Premium 64-bit Service Pack 1. 
    It has intel core i5 cpu m480 2.67ghz 2667mhz 2 core 4 logical processor and two of 2GB SODIMM Samsung 1067MHz are used right now. (total 4GB memory) I'd like to upgrade the memory and
    What is the maximum GB of RAM this laptop can have? 
    Which type of RAM cards should I install? (brand/MHz/GB...)
    I tried a 8GB PC3 10600 1333MHz CL9 SoDimm and it caused an error and won't start Windows so I went back to original 2GB.

    Hi:
    The maximum memory you can run in a pc with the i5 first generation core processor is 2 x 4 GB.

  • My Intel iMac always has around 2 GB available RAM, even when i run apps. Why is that?

    I own a Intel iMac from aug. 2007. It has 2 gigabytes of ram and about a year ago i upgraded it with 2 gigabytes more.
    The machine runs as it should and had no problems after the installation. It discovered the ram instantly and now says 4 GB 800 MHz DDR2 SDRAM in the "about this Mac" window.
    My problem is that when i run applications which require something (like rendering in Final Cut or playing Diablo III) the activity monitor app still says that the iMac has almost 2 gigabytes of ram available.
    It would only be natural to presume that it is because it does not need the additional ram, but that is not the case. Final Cut rendering is slow and Diablo III runs mostly at about 18 FPS on the lowest settings.
    Why is this and is it possible to get the iMac to use that additional RAM?

    This is true. It gradualy changes, but it never goes below 1 gigabyte.
    This is with Diablo and Chrome running simultaneously. They are both give about 500 megabites each, wit Diablo on the lowest resolution and graphics. Still Diablo runs at about 12-18 FPS. This is my problem.
    Edit: Reflecting on this I realized that OSX of cause only allows every app a limited amount of memory. This changes my question to: Is it possible to raise the apps maximum memory cap?
    Message was edited by: JonasEK

  • How to change the Browser title when report runs on the web?

    Hi folks,
    How to change the title of the browser when I run my report on the web? Iam using Internet explorer and Reports 6i. Is it possible in 6i or 10g reports?
    Could you please tell me the step by step procedure ?
    Right now the browser is displaying the URL when I run the report with format = PDF.
    Thanks.

    It works for me. I don't see why you have a problem with >this code.
    Can you look at the source code of the html >file that was created (so, not in the browser, but in a >text editor). What do the header and title look like?The Html code in the file is same as the above code I specified. Actually I copied the same code and pasted here. But when I run the html file the Title shows up.
    Don't put </html> there. Maybe that helps. I tried this, but it did not work.
    Please let me know is there any way to set it dynamically inside the triggers using SRW built_in.
    Thanks alot.

Maybe you are looking for

  • Not quite sure what the problem is need major help

    My sister has a Terca 8000, and god only knows how old it is. The laptop screen is black and the phrase "Insert system disk" keeps popping up. I have tried to install different programs, but it will not do anything. As soon as you put in the disk it

  • How to use ANCESTOR function in BPC NW

    I need to calculate averagre NetSales rate and so forth at  product category level which is send level in the product hierarchy and three levels above base level product. I am using following MDX logic to calculate this average and store at every pro

  • WoW SB Tap Chat not working, not visible in Creative Audio Control Panel

    I just received one of the new Sound Blaster World of Warcraft Tap Chat foot pedals and so far... it's not been a joy to use The problem is that the device does not show up in the Audio Control panel (the creative panel) as a configurable device. I h

  • Smart form Colour Print

    Hi . I have an  issue in smartform printing. while seeing the print preview the logo is comming in colour. but in the print ,black and white logo is comming.I want the clour logo in the print also. the printer is a colour printer. are there any setti

  • Reg:Error during migo

    While doing migo i'm getting the below error "Excise invoice items are os different register types " Regards, vvk