private void SetKey(int length, IntPtr input, IntPtr output, IntPtr fftPlan) { if (!memory.ContainsKey(length)) { memory[length] = new FFTWArray { Input = input, Output = output, Plan = fftPlan }; return; } if (input != IntPtr.Zero) { memory[length].Input = input; } if (output != IntPtr.Zero) { memory[length].Output = output; } if (fftPlan != IntPtr.Zero) { memory[length].Plan = fftPlan; } }