codegen: Fix memory management in generic methods
codegen: Fix memory management in generic methods

Fixes bug 648903.

playya/vala,severinh/vala,kamanashisroy/aroop,playya/vala,tjol/vala-tjol,tjol/vala-tjol,Distrotech/vala,frida/vala,Distrotech/vala,frida/vala,kamanashisroy/aroop,spidermonkdust/vala,frida/vala,jessevdk/vala,rvu95/vala,spidermonkdust/vala,rvu95/vala,GNOME/vala,GNOME/vala,xdave/pvala,severinh/vala,GNOME/vala,flobrosch/vala-fixes,jessevdk/vala,tjol/vala-tjol,playya/vala,flobrosch/vala-fixes,Distrotech/vala,severinh/vala,rvu95/vala,jessevdk/vala,frida/vala,kamanashisroy/aroop,GNOME/vala,frida/vala,flobrosch/vala-fixes,spidermonkdust/vala