Showing results 1 to 8 of 8

Thread: Memory Leak when using IArchiveFilter.Query()

  1. #1

    Default Memory Leak when using IArchiveFilter.Query()

    Hello!

    Fore some our needs we use programmable access to archive data with code like this:

    _archive = _archives.Item(_varList[n].Name);
    _archiveFilter = _archive.ArchiveFilters().CreateArchiveFilter();
    _archiveFilter.AddArchiveVariable(_archive.Archive Variables().Item(_varList[n].Identification));
    _archiveFilter.StartTime = _interval.FilterStartTime;
    _archiveFilter.EndTime = _interval.FilterEndTime;
    _archiveFilterVariables = _archiveFilter.Query();

    We noticed, that each time after .Query() call memory used by zenrt32.exe increases and increases, and after some time runtime crushes.

    Using code like this:

    _archiveFilterVariables = null;
    _archiveFilter = null;
    GC.Collect()

    takes no effect.

    What we do wrong?
    We use 6.51 SP5 version.

  2. #2

    Default Re: Memory Leak when using IArchiveFilter.Query()

    Recheck on 6.51 SP0 Build4 - same situation.
    (in the base message 6.51 SP5 means 6.51 SP0 Build5).

  3. #3
    Join Date
    20.08.2009
    Posts
    293

    Default Re: Memory Leak when using IArchiveFilter.Query()

    Hi,

    without seeing the whole code it is hard to say what the issue could be.
    Do you have a short sample project where this effect occurs?

    Regards,
    Bernhard

  4. #4

    Default Re: Memory Leak when using IArchiveFilter.Query()

    I send sample project to support@copadata.com. Hope spam filter will not delete it.

  5. #5

    Default Re: Memory Leak when using IArchiveFilter.Query()

    I'll repeat mail content here:

    http://www.onlinedisk.ru/file/731680/

    Archive contains sample project and illustated problem screencast.
    Problem is each time i read from archive ~150 values, memory increases on 0.1 Mb and not decreases then.

  6. #6

    Default Re: Memory Leak when using IArchiveFilter.Query()

    Just make VBA example with same logic - situation repeates. ~ 0.1 Mb per 150-200 values.

  7. #7
    Join Date
    20.08.2009
    Posts
    293

    Default Re: Memory Leak when using IArchiveFilter.Query()

    Hello,

    please add the line:
    _archive.ArchiveFilters().DeleteArchiveFilter(0);
    in VSTA, respectively
    zArchive.ArchiveFilters.DeleteArchiveFilter (0)
    in VBA to fix the memory problem.

    Regards,
    Bernhard

  8. #8

    Default Re: Memory Leak when using IArchiveFilter.Query()

    Oh, thank you very much, this works great )

Similar Threads

  1. InitInstance():Out of memory
    By scotttee in forum zenon Supervisor
    Replies: 3
    Last Post: 4th April 2012, 23:58
  2. Format of SQL query results in Report Generator
    By affoltep in forum zenon Supervisor
    Replies: 3
    Last Post: 13th August 2010, 16:08
  3. CEL Entries from memory or file
    By roberto1978 in forum zenon Supervisor
    Replies: 2
    Last Post: 8th February 2010, 11:57
  4. memory on windows CE
    By sebastiank in forum zenon Operator
    Replies: 0
    Last Post: 19th September 2007, 08:05

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •