When using a custom action generated using MakeSfxCA.exe the temporary folder created does not get deleted.
Looking through the source code of the WindowsInstaller project it appears that src\DTF\Libraries\WindowsInstaller\CustomActionProxy.cs:116 sets the CurrentDirectory to the temporary extraction directory, however, this adds a lock to the directory which prevents it from being removed. I assume this is to allow dependant assemblies to be resolved.
A solution that we are using locally to fix this problem is to modify src\DTF\Tools\SfxCA\SfxCA.cpp to GetWorkingDirectory before extraction, then before attempting to remove the folder, SetWorkingDirectory back to the original location. Alternatively this could happen in a finally statement of the try block that the CurrentDirectory is set within CustomActionProxy.cs
I have attached the 2 possible solutions, I hope they are of help.