Save a big memory object to fi

Hi, in my App, I have a image which may be as big as 8M bytes. I would like to save it to a file to iphone local disk. I know I can make it to NSObject (or NSData?). My questions is how can I set the path of this file.
thanks,
ff

Can anyone show me some code about how to save a big memory to iphone local storage and read it back?
Thanks,
ff

Similar Messages

  • Firefox on Win 7 64 bit is a big memory hogger; on Win 8.1 32 bit, it's not

    As above; I have several PCs, on two of which I use FF regularly. One PC has Win 7 64-bit as OS while the other has Win 8.1 32-bit as OS.
    I noticed that Firefox on Win 7 64-bit is a big memory hogger, sometimes eating up more than 2GB of RAM and obviously getting into an overflow of some sort after prolonged use. It essentially has some problem regarding memory or chache management, as closing tabs does not lower RAM consumption. It is not possible to leave FF open for days without experiencing this error. In Task Manager, I noticed that when the overflow occurs, FF keeps increasing its memory consumption.
    On Win 8.1 32-bit, the above problem does not exist. Closing tabs lowers memory consumption, an overflow does not occur, and leaving the window open for days does not affect performance.
    Can anyone help?

    Memory leaks are almost always caused by plugins or add-ons. These leaks can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from [https://www.mozilla.org mozilla.org] (or choose the download for your operating system and language from [https://www.mozilla.org/firefox/all/ this page]) and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (or open the Firefox menu [[Image:New Fx Menu]] and click the close button [[Image:Close 29]]).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    More information about reinstalling Firefox can be found [[Troubleshoot and diagnose Firefox problems#w_5-reinstall-firefox|here]].
    <b>WARNING:</b> Do not use a third party uninstaller as part of this process. Doing so could permanently delete your [[Profiles|Firefox profile]] data, including but not limited to, extensions, cache, cookies, bookmarks, personal settings and saved passwords. <u>These cannot be easily recovered unless they have been backed up to an external device!</u> See [[Back up and restore information in Firefox profiles]]. <!-- Starting in Firefox 31, the Firefox uninstaller no longer lets you remove user profile data.Ref: Bug 432017 and https://support.mozilla.org/kb/uninstall-firefox-from-your-computer/discuss/5279 [Fx31] Windows uninstaller will no longer offer the option to remove personal data -->
    Please report back to say if this helped you!
    Thank you.

  • Question on use of shared memory objects during CIF executions

    We have a CIF that runs in background via program RIMODACT that is invoked from our external job scheduler.  (The schedulere kicks off a job - call it CIFJOB - and the first step of this job executes RIMODACT.)
    During the execution of RIMODACT, we call a BAdI (an implementation of SMOD_APOCF005.)
    In the method of this BAdI, we load some data into a shared memory object each time the BAdI is called. (We create this shared memory object the first time the BAdI is called.)
    After program RIMODACT finishes, the second step of CIFJOB calls a wrapper program that calls two APO BAPI's.  
    Will the shared memory object be available to these BAPIs?
    Reason I'm asking is that the BAPIs execute on the APO app server, but the shared memory object was created in a CIF exit called from a program executing on the ECC server (RIMODACT).
    Edited by: David Halitsky on Feb 20, 2008 3:56 PM

    I know what you're saying, but it doesn't apply in this case (I think.)
    The critical point is that we can tie the batch job to one ECC app server.  In the first step of this job (the one that executes RIMODACT to do the CIF), we build the itab as an attribute of the "root" shared memory object class.
    In the second step of the batch job, we attach to the root class we built in the first step, extract some data from it, and pass these data to a BAPI that we call on the APO server.  (This is what I meant by a "true" RFC - the APO BAPI on the APO server is being called from a program on the ECC server.)
    So the APO BAPI never needs access to the ECC shared memory object - it gets its data passed in from a program on the ECC server that does have access to the shared memory object.
    Restated this way, is the solution correct ???

  • Dynamically built query on execution How to save the data in Object Type

    Hi,
    In pl/sql I am building and executing a query dynamically. How can I stored the output of the query in object type. I have defined the following object type and need to store the
    output of the query in it. Here is the Object Type I have
    CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPE AS OBJECT(
    pkid NUMBER,
    pkname VARCHAR2(100);
    pkcity VARCHAR2(100);
    pkcounty VARCHAR2(100)
    CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPETAB AS TABLE OF FIRST_RECORDTYPE;Here is the query generated at runtime and is inside a LOOP
    --I initialize my Object Type*
    data := new FIRST_RECORDTYPETAB();
    FOR some_cursor IN c_get_ids (username)
    LOOP
    x_context_count := x_context_count + 1;
    -- here I build the query dynamically and the same query generated is
    sql_query := 'SELECT pkid as pid ,pkname as pname,pkcity as pcity, pkcounty as pcounty FROM cities WHERE passed = <this value changes on every iteration of the cursor>'
    -- and now I need to execute the above query but need to store the output
    EXECUTE IMMEDIATE sql_query
    INTO *<I need to save the out put in the Type I defined>*
    END LOOP;
    How can I save the output of the dynamically built query in the Object Type. As I am looping so the type can have several records.
    Any help is appreciated.
    Thanks

    hai ,
    solution for Dynamically built query on execution How to save the data in Object Type.
    Step 1:(Object creation)
    SQL> ED
    Wrote file afiedt.buf
    1 Create Or Replace Type contract_details As Object(
    2 contract_number Varchar2(15),
    3 contrcat_branch Varchar2(15)
    4* );
    SQL> /
    Type created.
    Step 2:(table creation with object)
    SQL> Create Table contract_dtls(Id Number,contract contract_details)
    2 /
    Table created.
    Step 3:(execution Of procedure to insert the dynamic ouput into object types):
    Declare
    LV_V_SQL_QUERY Varchar2(4000);
    LV_N_CURSOR Integer;
    LV_N_EXECUTE_CURSOR Integer;
    LV_V_CONTRACT_BR Varchar2(15) := 'TNW'; -- change the branch name by making this as input parameter for a procedure or function
    OV_V_CONTRACT_NUMBER Varchar2(15);
    LV_V_CONTRACT_BRANCH Varchar2(15);
    Begin
    LV_V_SQL_QUERY := 'SELECT CONTRACT_NUMBER,CONTRACT_BRANCH FROM CC_CONTRACT_MASTER WHERE CONTRACT_BRANCH = '''||LV_V_CONTRACT_BR||'''';
    LV_N_CURSOR := Dbms_Sql.open_Cursor;
    Dbms_Sql.parse(LV_N_CURSOR,LV_V_SQL_QUERY,2);
    Dbms_Sql.define_Column(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER,15);
    Dbms_Sql.define_Column(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH,15);
    LV_N_EXECUTE_CURSOR := Dbms_Sql.Execute(LV_N_CURSOR);
    Loop
    Exit When Dbms_Sql.fetch_Rows (LV_N_CURSOR)= 0;
    Dbms_Sql.column_Value(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER);
    Dbms_Sql.column_Value(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH);
    Dbms_Output.put_Line('CONTRACT_BRANCH--'||LV_V_CONTRACT_BRANCH);
    Dbms_Output.put_Line('CONTRACT_NUMBER--'||OV_V_CONTRACT_NUMBER);
    INSERT INTO contract_dtls VALUES(1,CONTRACT_DETAILS(OV_V_CONTRACT_NUMBER,LV_V_CONTRACT_BRANCH));
    End Loop;
    Dbms_Sql.close_Cursor (LV_N_CURSOR);
    COMMIT;
    Exception
    When Others Then
    Dbms_Output.put_Line('SQLERRM--'||Sqlerrm);
    Dbms_Output.put_Line('SQLERRM--'||Sqlcode);
    End;
    step 4:check the values are inseted in the object included table
    SELECT * FROM contract_dtls;
    Regards
    C.karukkuvel

  • Enhanced protected mode and global named shared memory object

    Good morning.
    I've written a bho that do data exchange with a system service. The service creates named shared memory objects in the Global namespace. Outside appcontainer IE 11 sandboxed everything works fine lowering objects integrity level. Inside the sandboxed environment
    OpenFileMappingW seems to return a valid handle but the calls to MapViewOfFile always gives access denied. What i'm missing? Thank you.
    Service code for security descriptor creation:
    if (InitializeSecurityDescriptor(pSA->lpSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION))
    if (ConvertStringSecurityDescriptorToSecurityDescriptorW(L"D:P(A;;GA;;;WD)(A;;GA;;;AC)", SDDL_REVISION_1, &pSecDesc, NULL) == TRUE)//
                BOOL fAclPresent = FALSE;
                BOOL fAclDefaulted = FALSE;
                if (GetSecurityDescriptorDacl(pSecDesc, &fAclPresent, &pDacl, &fAclDefaulted) == TRUE)
                    bRetval = SetSecurityDescriptorDacl(pSA->lpSecurityDescriptor, TRUE, pDacl, FALSE);
            if (bRetVal ==TRUE && ConvertStringSecurityDescriptorToSecurityDescriptorW(L"S:(ML;;NW;;;LW)", SDDL_REVISION_1, &pSecDesc, NULL) == TRUE)
                BOOL fAclPresent = FALSE;
                BOOL fAclDefaulted = FALSE;
                if (GetSecurityDescriptorSacl(pSecDesc, &fAclPresent, &pSacl, &fAclDefaulted) == TRUE)
                    bRetval = SetSecurityDescriptorSacl(pSA->lpSecurityDescriptor, TRUE, pSacl, FALSE);
                    OutputDebugStringW(L"SACL ok.");
        return bRetval;
    BHO code
    LPMEMORYBUFFER OpenDataChannel(HANDLE *hQueue)
        LPMEMORYBUFFER lp = NULL;
        WCHAR data[512] = { 0 };
        for (int a = 0;; a++)
            if(iestatus==FALSE)StringCchPrintfW(data, 512,L"Global\\UrlfilterServiceIE.%d", a);//NOT in EPM
            else StringCchPrintfW(data, 512, L"%s\\Global\\UrlfilterServiceIE.%d",appcontainernamedobjectpath, a);//in EPM
            *hQueue = OpenFileMappingW(FILE_MAP_ALL_ACCESS, TRUE, data);//FILE_MAP_ALL_ACCESS
            if (*hQueue != NULL)
                //file mappato esistente
                lp = (LPMEMORYBUFFER)MapViewOfFile(*hQueue, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(MEMORYBUFFER));//FILE_MAP_ALL_ACCESS
                if (lp != NULL)

    Ciao Ritchie, thanks for coming here. ;-)
    I call (only) OpenFileMapping and MapViewOfFile inside my code and i get access denied at the first try. As i stated before this happens when IE11 is working inside EPM 32/64bit mode, outside EPM it works as it should. However i decided to take a different
    approach to do IPC, because, you want it or not, the service is up and running as SYSTEM... Still i'm really interested about two points:
    1) can i use global kernel objects in EPM mode?
    2) if one is "yes, you can": what's wrong with my code? The security descriptor? Something else?
    Thanks all.

  • Where is the network memory object?

    Hello,
    I have a performance problem.
    I wrote a logical network in the spatial database with around 120.000 links and 100.000 nodes.
    I can read the network through SDO_NET_MEM PL/SQL but I cant read it through the Java API. I get an OutofMemory error.
    I tried to increase the JVM size through the IDE I'm using (eclipse) but it had no effect at all.
    I read that the Java API and the SDO_NET_MEM package use the network memory object which is a cache in a virtual memory. How can I adjust the size of this cache?
    Cheers,
    Elif

    see post :
    Re: Network analysis performance issue
    you have to manage your java memory to run your java client and there is also a java memory space in the oracle server that you can increase with SDO_TOPO_MAP.SET_MAX_MEMORY_SIZE(value)
    value is in bytes (not in kb like the documentation says!!!)

  • OpenCL: best way to resize memory objects

    I'm a beginner in OpenCL and I have a question about memory management (like 99.99% of noob questions about OpenCL, I guess...). I enqueue the kernel for execution inside a loop in the host code; at each iteration the size of the buffers used for memory objects passed as kernel arguments is different. Currently, I do something like this using the C++ wrapper API (which BTW I find much more easy to use than the C interface, that nevertheless seems to be the most used interface yet):
    // Set platform, kernel, queue etc.
    for (int i = 0; i < nIterations; i++){
    // Set buffer sizes and fill them
    // OpenCL section
    cl::Buffer clBuffer1 = cl::Buffer(context, CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR, bufferSize1*typeSize1, (void *) &(buffer1[0]));
    cl::Buffer clBuffer2 = cl::Buffer(context, CL_MEM_USE_HOST_PTR, bufferSize2*typeSize2, (void *) &(buffer2[0]));
    cl::Buffer clBuffer3 = cl::Buffer(context, CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR, bufferSize3*typeSize3, (void *) &(buffer3[0]));
    kernel.setArg(0, clBuffer1);
    kernel.setArg(0, clBuffer2);
    kernel.setArg(0, clBuffer3);
    queue.enqueueNDRangeKernel(kernel, cl::NullRange, cl::NDRange(someValueForRange), cl::NullRange);
    queue.enqueueMapBuffer(clBuffer2, CL_FALSE, CL_MAP_READ, 0, bufferSize2*typeSize2);
    queue.enqueueMapBuffer(clBuffer3, CL_TRUE, CL_MAP_READ, 0, bufferSize3*typeSize3);
    // Do something with retrieved data
    I'm sure there are thousands of less-than-sub optimal memory access patterns in the code above, but for the moment I'm facing this issue: is there a way to modify the size of the cl::Buffer objects without having to reinstantiate them at each iteration of the loop? I fear that this constinuous create/destroy of cl::Buffer objects causes a full reallocation of memory on the CL device at each loop iteration, potentially degrading the overall performance. I think that also a size modification (a' la STL, to be more clear) could result in some memory reallocation, but hopefully less frequently. Or is it better to statically define oversized buffers outside the loop and play with the size arguments of enqueueMapBuffer inside the loop to transfer only the needed range of data to the GPU at each iteration of the loop?
    Sorry for the possibly confusing question but as I said I'm a noob with OpenCL and this particular kind of problem seems to be not very common. Thanks.
    Last edited by snack (2014-01-08 14:52:31)

    Hi
    First a vector drawing will not work on the web unless you convert it too svg, (only supported on 40% of browsers IE requires a plug-in) or use it within flash. You will have to convert it to gif / jpeg / png. If you convert to png this will retain the transparency for you.
    As to the size, then resizing should be done in illustrator or similar then exported into photoshop or fireworks, and from these use your export for web option, and optimize the image.
    PZ

  • Can i save app. to memory card.

    how can you save applications to memory card...when you choose option move to memory card...the application move from phone to phone internal sd(sd 0)...not external memory card.am i donig something wrong.

    Read here as already brought up in the forum many times.
    http://discussions.nokia.com/t5/Nokia-X/how-to-install-apps-and-games-to-external-memory/td-p/262110...
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Short Dump TSV_TNEW_PAGE_ALLOC_FAILED while using shared memory objects

    Hi Gurus,
    We are using shared memory objects to stor some data which we will be reading later. I have implemented the interfce IF_SHM_BUILD_INSTANCE in root class and using its method BUILD for automatic area structuring.
    Today our developments moved from dev system to quality system, and while writing the data into the shared memory using the methods ATTACH_FOR_WRITE and DETACH_COMMIT in one report. We started getting the run time error TSV_TNEW_PAGE_ALLOC_FAILED.This is raised when the method DETACH_COMMIT is called to commit the changes in the shared memory.
    Everyhting works fine before DETACH_COMMIT. I know that it is happening since the program ran out of extended memory, but I am not sure why it is happening at DETACH_COMMIT call. If excessive memory is being used in the program, this run time error should have been raised while calling the ATTACH_FOR_WRITE method or while filling the root class attributes. I am not sure why it is happening at DETACH_COMMIT method.
    Many Thanks in advance.
    Thanks,
    Raveesh

    Hi raveesh,
    as Naimesh suggested: Probably system parameter for shared memory area is too small. Compare the system parameters in devel and QA, check what other shared memory areas are used.
    Regarding your question, why it does not fail at ATTACH_FOR_WRITE but then on DETACH_COMMIT:
    Probably ATTACH_FOR_WRITE will set an exclusive write lock on the shared memory data, then write to some kind of 'rollback' memory and DETACH_COMMIT will really put the data into shared memory area and release the lock. The 'rollback' memory is in the LUW's work memory which is much bigger as the usual shared memory size.
    This is my assumption - don't know who can verify or reject it.
    Regards,
    Clemens

  • How to save OTF to Memory using E_PRINT_PO?

    HI All,
    How to save OTF to Memory using this FM: ME_PRINT_PO.
    Please let me know.
    Ashok

    No, it should be there, becos inside that FM this fm is also calling, SAVE_OTF_TO_MEMORY. but it is calling in Enhancement point. im not able to put the break point there. i think that code is not executing.
    im getting this error: Breakpoint not set since enhancement ISAUTO_SCH_EMM_SAPLMEDRUCK is switched off.
    Please help me on this.
    Ashok..

  • Big memory usage in NetStream

    After some checking about our player memory usage - we descovered that when appendingBytes() into a netStream - it takes about 10-15 times the size (in Bytes) of the original video file from which we have read. Is there any way to lower this big memory consumption?
    Moreover - is there any way to "dispose" the buffer that was already played by appendBytes()?
    I tried to set inBufferSeek to false and maxBufferTime to 1. it doesn't seem to have any effect.

    Define "huge memory". Oracle generally requires a couple of hundred Mb of RAM.
    You can certainly change these services to start manually so long as you don't want your database to be running automatically.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Lightroom 2.3RC and Fast MBP Mac 10.5.6 Still Has BIG Memory Issue

    Lightroom 2.3RC still have a big memory issue on my Macbook Pro (Feb 2008) with 4GB of RAM both in 64bit and 32bit mode. After working on photos in a catalog (using Activity monitor) Lightroom causes my Free Memory to hover around only 10MB or less (causing Lightroom to continually hang or crash) while Inactive RAM sits at 1.5GB! Lightroom should be using this Inactive RAM rather than taking my Free RAM down to nearly nothing and causing freezes or crashes.
    This is not as much of a problem in 2.2 32bit mode, but is a problem on 2.2 64bit mode. However, now with 2.3RC this is a problem on both the 32 and 64bit modes. Please Adobe address this huge huge huge memory problem in Lightroom. Why does Lightroom 2.2 32bit handle memory pretty okay but not Lightroom 2.3RC 32bit mode or 64bit mode? Why did 2.3RC break what for the most part worked in 2.2 32bit mode (even though that wasn't too great either).
    Also I am only running Lightroom (no other programs). I admire the product Adobe, but this problem has persisted far too long and is making Lightroom unusable.

    Hmm. I've been sticking with 2.1 until hearing widespread reports of stability. Every time I checked the forums, I didn't like what I heard about 2.2 so I stayed away. I dropped by to see what the Mac users thought of 2.3. Have you tested on another machine? I assume 2.1 was good for you? Can't wait to see what others are experiencing.

  • How to divide big serialized object in parts to be able to save as Blob typ

    Hi,
    Actually i have serialize a big XML document object and want to save in a field of type Blob. As Blob size is 64k. So if the serialized object is greater than 64k. It gives me error of size.Can anybody tell how to break large serialized objects.
    I am using this code
    File f = new File("out.ser");
    FileInputStream fin = new FileInputStream(f);
    p = farCon.prepareStatement("insert into TeeColor values('3',?)");
    p.setBinaryStream(1, fin, f.length());
    p.executeUpdate();
    This code works fine if the size of out.ser file is less than 64k. But does not work for bigger sizes
    Please help me out
    Thanks

    Read your data from the file into a byte array, then extract 64K at a time into a smaller byte array, and use a ByteArrayInputStream for updating the database.

  • How do I save only the VISIBLE objects in AI to Pdf or jpeg.

    I have multiple layers but only want to save the currently visible elements objects out in a PDF or JPEG,
    how do I do this without having to tediously double click each layer and choose "do not print" (layer).
    would be nice to have a preference in prefs to "not print hidden layers".

    You can choose to have your non-visable Illustrator layers preserved but invisible in your PDF, or removed completely. To remove them, select Acrobat 5 compatibility or earlier, or deselect the preserve layers option. If you include your invisible layers there is a possibility they will re-appear in some PDF viewers.
    http://forums.adobe.com/message/4964425#4964425

  • Acrobat 6 - Save As - Removing Unused Objects

    When using the "Save As" feature to save from a mapped network drive to the personal drive, documents that are created from a scanned image take a long time to save, and on the progress bar show the message "Removing Unused Objects".  My client is using Acrobat Standard 6, and I am unable to find any type of "PDF Optimizer" as the later versions have.  Is there any way to remove this background processing that Adobe is doing and speed up the network saving?
    Thanks,
    edgetech1

    Is there anyone out there who can offer some insight into this?

Maybe you are looking for

  • Need to restart the explorer.exe process virtually every single time I need to access a file

    As the subject/title says. This is on my replacement ThinkPad W530 which replaced my previous T530. I had my T530 from about April until earlier this week when it was picked up. The T530 gave me nothing but problems, including, but not limited to: Co

  • Reinstall LR5 in Adobe CC

    On 31 March I  signed up for Adobe Creative Cloud under the $9.99 monthly payment option. All went well and I downloaded PS and LR5. The LR however came up as a 30 day free trial; not what I expected or wanted. Today I reviewed the various help menus

  • Removing items in my startupitems folder

    My own account login items list in my systems preferences window is limited to one item- an istat menus helper app. But my mac hd/library/StartupItems folder contains two items that I don't recognize and don't think have much to do with starting up t

  • Can't install Itunes due to Quicktime problems

    I have tried to install Itunes a few times, but every time I do I receive this error message, 'A newer version of Quicktime is already installed. This installation cannot proceed while the newer version of Quicktime is installed". I have uninstalled

  • Can method return before body is executed?

    In JLS section 8.1.3.4 http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#36930 "This prevents method one and method two from being executed concurrently, and furthermore guarantees that the shared values of i and j are both upda