Bug in documentation: Gio::File Class Reference
- From: Alwin Leerling <dna leerling gmail com>
- To: Gtkmm Mailing List <gtkmm-list gnome org>
- Subject: Bug in documentation: Gio::File Class Reference
- Date: Thu, 04 Aug 2016 10:38:52 +1200
I believe I may have found some errors in the reference documentation
of the Gio::File Class:
Function signatures
std::string Gio::File::get_basename() const
std::string Gio::File::get_path() const
std::string Gio::File::get_relative_path(
const Glib::RefPtr< const File & descendant >
) const
std::string Gio::File::get_uri() const
are all declared returning a const std::string. The documentation
states
"The returned string should be freed with Glib::free() when no longer
needed."
Function signature
Glib::ustring Gio::File::get_parse_name() const
states the same.
IMHO std::string's should never be freed as they are stack variables,
let alone freed with Glib as st::strings are part of the Standard C++
library. On top of that I would never try to free a const.
Best Regards
Alwin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]