Issue in using the IPersist Interface RRS feed

  • Question

  • Hi,

    I am facing high VM usage problem in my application after using the IPersist interface for text filtering. First I've got the pointer to IPersistStream interface and then the file over which text filtering is to be applied, its entire content is fetched and copied to a buffer using normal file handling functions. Then I've created an IStream pointer from the buffer using CreateStreamOnHGlobal() function and then  Load of IPersistStream is called for the IStream pointer created from the data buffer and afterwards the normal GetChunk() method is called to extract the contents of the file chunk by chunk for text filtering. Once filtering the done the UnLoad method is called to clean up all the allocated resources i.e. calling all the appropriate Release() functions. Having done all this application is still getting crashed due to high VM usage. Kindly suggest what can be done to low down that VM usage since I've done all the required cleaning once filtering on each particular file is done or Am I missing some cleaning of resources. Please help me out ASAP.......

    Note: the whole process is repeated for each file, every time a file comes for text filtering


    Sheela Gusain

    Monday, December 3, 2012 5:09 PM

All replies