mrvux / dx11-vvvv

DirectX11 Rendering within vvvv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

possible Memory Leaks

sebllll opened this issue · comments

commented

Hello Mr. Vux,
I think we discovered 2 memory leaks:

  1. Temptarget Dispose (forum post)

This particular issue can be prevented when adding
this.FOutBuffers.SafeDisposeAll();
this.FOutAABuffers.SafeDisposeAll();
here

I'm still not sure if that's the best solution, because there might be a particular reason for the missing dispose functionality...

  1. TextureFx Dispose (forum post)

This might be a texturefx disposing issue, but a first debugging session was not successfull and i didn't find out, where the leak exactly happens.

thanks,
sebl

commented
  1. Indeed, dispose was not called, which was a non issue normally (as the pool gets clears on app quit), but indeed that was an issue in case of create node. Dispose actually funnily fixes the issue, as it leaves a disposed locked resource in the pool, but did it the clean way as to remove it properly from there.

  2. Issue was more subtle, as actually was in the effect factory, which was not calling dispose at the end.

Both are fixed now

commented

Also if needed :
https://ci.appveyor.com/project/mrvux/dx11-vvvv/build/1.1.1.5-alpha/artifacts

there are builds for it.

Considering there's now 3 issues worth doing new release (nil quad recovery too) I'll likely do a new version soon

commented

super! thanks for the quick fix and also for the explanations!

commented

sorry, one more related thing:
the fix you applied in the shaderfactory also has to be done in the AbstractDX11CompShaderFactory for compiled effects...

i tried the exact same thing and it worked here:

        protected override bool DeleteNode(INodeInfo nodeInfo, IInternalPluginHost pluginHost)
        {
            var plugin = pluginHost.Plugin;

            if (plugin is IDisposable)
            {
                var disposablePlugin = plugin as IDisposable;
                disposablePlugin.Dispose();
            }

            if (this.PluginDeleted != null)
            {
                this.PluginDeleted(pluginHost.Plugin);
            }

            return true;
        }
commented

Good point, reopening

commented

Added on precompiled ones too, guess can close again now.