core: unref slice ref after use