:right-sidebar: True memory_mode_t =================================================================== .. currentmodule:: gi.repository.HarfBuzz .. class:: memory_mode_t :no-contents-entry: Data type holding the memory modes available to client programs. Regarding these various memory-modes: - In no case shall the HarfBuzz client modify memory that is passed to HarfBuzz in a blob. If there is any such possibility, ``HB_MEMORY_MODE_DUPLICATE`` should be used such that HarfBuzz makes a copy immediately, - Use ``HB_MEMORY_MODE_READONLY`` otherwise, unless you really really really know what you are doing, - ``HB_MEMORY_MODE_WRITABLE`` is appropriate if you really made a copy of data solely for the purpose of passing to HarfBuzz and doing that just once (no reuse!), - If the font is mmap()ed, it's okay to use ``HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE``\, however, using that mode correctly is very tricky. Use ``HB_MEMORY_MODE_READONLY`` instead. Fields ------ .. rst-class:: interim-class .. class:: memory_mode_t :no-index: .. attribute:: DUPLICATE The type of the None singleton. .. attribute:: READONLY The type of the None singleton. .. attribute:: READONLY_MAY_MAKE_WRITABLE The type of the None singleton. .. attribute:: WRITABLE The type of the None singleton.