Ignore:
Timestamp:
Oct 25, 2008, 2:15:37 AM (12 years ago)
Author:
charles
Message:

(libT) a small, simple memory optimization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/ptrarray.c

    r6795 r6953  
    3434    p = tr_new( tr_ptrArray, 1 );
    3535    p->n_items = 0;
    36     p->n_alloc = GROW;
    37     p->items = tr_new( void*, p->n_alloc );
     36    p->n_alloc = 0;
     37    p->items = NULL;
    3838
    3939    return p;
     
    5959
    6060    assert( t );
    61     assert( t->items );
     61    assert( t->items || !t->n_items );
    6262    assert( func );
    6363
     
    7171{
    7272    assert( t );
    73     assert( t->items );
     73    assert( t->items || !t->n_items );
    7474
    7575    if( func )
Note: See TracChangeset for help on using the changeset viewer.