Memory allocation

When I want to import previous session, I do simple operation

drive: INeroDrive;

Drive.ImportIsoTrack(track_count-1,NERO_IMPORT_ISO_ONLY);

But my application allocates system memory. And when I repeat this operation my application gets memory more and more. I can’t release allocated memory.
Can anybody help me?

What language are you using?

How and when do you repeat the import operation? Do you catch the event fired by the first import?

Generally, all memory used by NeroCOM should be released once you release all relevant interface pointers.

I tried this operation on Delphi 7 and later on VB6. Results are identical.
I has created simple application that imports previous session by pressed corresponding button, adds necessary files and folders and burns CD. If I try to repeat this operation then my application gets memory more and more.
I tacking memory allocation by “Windows Task Manager” (Win XP).

> Generally, all memory used by NeroCOM should be released
> once you release all relevant interface pointers.
No, unfortunately. I has tried it.
In VB6 I can release any COM object by using operation
set MyNeroObject = Nothing
(For other Global Objects - similarly)

But allocated memory does not release :frowning:

I also tried catch the event “OnDoneImport2” and hadle it, and
don’t catch this event. But results don’t change.

To release the allocated memory, I am forced to do the following:

//This code on Delphi (Pascal)
procedure local_clear(f: INeroFolder);
var
i,cnt: integer;
begin

if f=nil then exit;

cnt:=f.Files.Count;
for i:=0 to cnt-1 do
begin
f.Files.Remove(0);
end;
cnt:=f.Folders.Count;
for i:=0 to cnt-1 do
begin
local_clear(f.Folders.Item(0));
f.Folders.Remove(0);
end;
end;

In caller procedure:

local_clear(MyNeroRootFolder);
MyNeroRootFolder:=nil;

This small procedure release IneroFolder content recursively thru whole tree.
But I have found out, that now portion on which memory is increased every time, is equal ~12K.
Probably the root object of IneroFolder remains in memory.

I want to hear opinion of the “NeroCOM” developers very much.

Are you using the most recent NeroCOM version?

I have tried reproducing the memory leaks but could not find any. You must bear in mind that some memory leaks are false leaks. Memory might be freed but the actual disposal takes place after your memory checks. If the amounts of memory leaks are large, then this might not be the case but nevertheless I failed to find the leaks.

Recently I has downloaded NeroAPI v 6.3.1.6 (latest?) NeroCOM v 1.2.0.4
Earlier I used v 6.0.0.28 (NeroCOM typelibrary 1.2)
Nero SDK 1.04

Until I began to clear memory manually, I had losses of memory up to 10 Mb per one import operation (depending on size of imported session). For example I want to write 10 disks at one work session of my application (import previous->add new files->write onto disk).
In other words: At start my application allocated ~10 Mb of virtual memory. when I push the “Import Previous Session” button 10 times my application allocated more than 100Mb (!!!) of System Memory. And so on.
I tried it. All occurs how I have described.

After I began to destroy object INeroFolder manually memory leaks considerably have decreased, but have not disappeared.