template<typename Tr>
class Glib::Container_Helpers::ArrayKeeper< Tr >
A keeper class for C array.
Primarily used by C++ wrappers like gtkmm.
Its main purpose is to free its data when they are not needed. What will be destroyed depends on passed ownership upon construction.
The most common usage of Glib::ArrayKeeper is getting its data when converting std::vector to a C array:
{
}
A utility for converting between std::vector and plain C arrays.
Definition: vectorutils.h:467
CType * data() const
Gets data the keeper holds.
Variables of this class are seldom defined directly - it is mostly used as a temporary variable returned by Glib::ArrayHandler::vector_to_array().
Note that the usage above is correct with regards to C++ standard point 12.2.3. That means that data returned by data() method is valid through whole g_temp_do_something function and is destroyed, when this function returns.