wip: fix adapter memory leak/weak ref loss