Run your function in another thread then. When the thread finishes, it just goes away. Be aware that when your main thread (the rest of the progam) finishes, your thread will be terminated too (gets a ThreadAbortException). So you'll have to tell the main thread when your worker thread completes.
Chip H.