Skip to content
  • Sébastien Wilmet's avatar
    GtkTextView: use GSlice to allocate GtkTextLineSegment's · 983a03d5
    Sébastien Wilmet authored and Matthias Clasen's avatar Matthias Clasen committed
    Use GSlice to allocate all types of segments:
    - char
    - toggle
    - mark
    - pixbuf
    - child widget
    
    Char segments are a bit more complicated because the length of the text
    is determined at run time and stored in the 'byte_count' field. If the
    text is long, GSlice will call the system malloc() anyway, so it's
    better to always use GSlice for GtkTextLineSegment.
    
    Toggle segments are also freed in gtktextbtree.c, hence the function
    _gtk_toggle_segment_free() (for a later commit it would be nice to
    rename those functions with the _gtk_text prefix).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727908
    983a03d5