void Car::on_spawn() { if (registered_name.compare(0, 7, "static-") == 0) { disown(); disable_ai = true; } _variants.add("safe"); play("hold", true); }
static Tup<Bytes, Size> ScaleImage( Bytes&& image, Size const& size, i32 target_size, stb::ImageHint hint) { auto target_size_ = ScaleSize(size, target_size); auto temp_img = stb::image_rw::From(image, size, 4); auto res = stb::Resize(temp_img, target_size_, 4, hint); Bytes output_data = std::move(res.data_owner); res.disown(); return std::make_tuple(std::move(output_data), target_size_); }
Job::~Job() { WorkItem* tempItem; working.first(); while(!working.isEmpty()) { tempItem = working.take(); //set workitems job pointer to null tempItem->setParentJob(0); //put work items in a special list of WorkQueue class to be deleted //when they are finished. emit disown(tempItem); } }
void close() const { if(!ptr) return; state.fini(ptr); disown(); }
void on_spawn() { disown(); disable_ai = true; play("hold", true); }
void SurfaceBuffer::deref() { m_used = m_refCount.deref(); if (!m_used) disown(); }