freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] Move generic destroy to later in the fa


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] Move generic destroy to later in the face and size destruction.
Date: Wed, 16 Oct 2024 03:11:34 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

  • 13944366
    by Behdad Esfahbod (بهداد اسفهبد) at 2024-10-16T05:08:22+02:00
    Move generic destroy to later in the face and size destruction.
    
    * src/base/ftobjs.c (destroy_size, destroy_face): This is such that the
      generic destroy can be used to call `FT_Done_Library`.  For that to work,
      it needs to call it *after* having removed the face from the respective
      module.
    

1 changed file:

Changes:

  • src/base/ftobjs.c
    ... ... @@ -1253,14 +1253,14 @@
    1253 1253
         FT_Driver  driver = (FT_Driver)driver_;
    
    1254 1254
     
    
    1255 1255
     
    
    1256
    -    /* finalize client-specific data */
    
    1257
    -    if ( size->generic.finalizer )
    
    1258
    -      size->generic.finalizer( size );
    
    1259
    -
    
    1260 1256
         /* finalize format-specific stuff */
    
    1261 1257
         if ( driver->clazz->done_size )
    
    1262 1258
           driver->clazz->done_size( size );
    
    1263 1259
     
    
    1260
    +    /* finalize client-specific data */
    
    1261
    +    if ( size->generic.finalizer )
    
    1262
    +      size->generic.finalizer( size );
    
    1263
    +
    
    1264 1264
         FT_FREE( size->internal );
    
    1265 1265
         FT_FREE( size );
    
    1266 1266
       }
    
    ... ... @@ -1322,10 +1322,6 @@
    1322 1322
                           driver );
    
    1323 1323
         face->size = NULL;
    
    1324 1324
     
    
    1325
    -    /* now discard client data */
    
    1326
    -    if ( face->generic.finalizer )
    
    1327
    -      face->generic.finalizer( face );
    
    1328
    -
    
    1329 1325
         /* discard charmaps */
    
    1330 1326
         destroy_charmaps( face, memory );
    
    1331 1327
     
    
    ... ... @@ -1340,6 +1336,10 @@
    1340 1336
     
    
    1341 1337
         face->stream = NULL;
    
    1342 1338
     
    
    1339
    +    /* now discard client data */
    
    1340
    +    if ( face->generic.finalizer )
    
    1341
    +      face->generic.finalizer( face );
    
    1342
    +
    
    1343 1343
         /* get rid of it */
    
    1344 1344
         if ( face->internal )
    
    1345 1345
         {
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]