Fix memory leaks.
Allow captured arguments of unknown type.