Reputation: 6166
How can i release the pointer sourceImage after finishing using it.
Glib::RefPtr<Gdk::Pixbuf> sourceImage = Gdk::Pixbuf::create_from_file(inSourcePath.c_str());
Upvotes: 1
Views: 986
Reputation: 6509
As mentioned, you don't need to release it. Just let the RefPtr go out of scope and it will be released automatically. However, if for some reason you do want to release it manually, you can simply call sourceImage.reset()
Upvotes: 4