I think your memory leak is happening because your program isn't loading and unloading your addin properly.
Too be honest, your program needs a bit of work. For a start, you should declare all your variables inside a subroutine or function to limit their scope. Declaring variables at the module level should only be used if you REALLY need another sub/function/userform to access the variable. Use the Option Explicit statement to stop VB creating variables without you knowing about them. You're also using way too many variants. Variants are evil and should be avoided at all costs. They allow people to write really bad code, which can end up producing very obscure errors. Finally, you aren't checking all the return values for the loadaddin and unloadaddin functions.
I have to question the necessity of loading and unloading an addin programatically. If you need to use it all the time, then just leave it loaded all the time. Anyway, I've modified your code to load and unload PhotoWorks. It seems to work fine on my computer. You should be able to modify it to do want you want.
Option Explicit
Sub main()
Dim swApp As Object
Dim WorkingDirectory As String
Set swApp = Application.SldWorks
WorkingDirectory = "C:\Program Files\SolidWorks\photoworks\pworks.dll"
Select Case swApp.LoadAddIn(WorkingDirectory)
Case -1
MsgBox "Addin not loaded. Error generated"
Case 0
MsgBox "Addin loaded"
Case 1
MsgBox "Addin not loaded"
Case 2
Select Case swApp.UnloadAddIn(WorkingDirectory)
Case 0
MsgBox "Addin unloaded"
Case 1
MsgBox "Addin not unloaded"
End Select
End Select
End Sub
PS: Using 'unload' for objects is generally considered good form, but is often not that necessary. When a sub terminates, it will release all the memory allocated for it. There are a few instances where 'unload' should be used IMO, databases are a prime example.