Export variables without memleak