public void clear(){
    for(int i=0; i<modes; i++){
      mode_param[i]=null;
    }
    mode_param=null;

    for(int i=0; i<maps; i++){ // unpack does the range checking
      FuncMapping.mapping_P[map_type[i]].free_info(map_param[i]);
    }
    map_param=null;

    for(int i=0; i<times; i++){ // unpack does the range checking
      FuncTime.time_P[time_type[i]].free_info(time_param[i]);
    }
    time_param=null;

    for(int i=0; i<floors; i++){ // unpack does the range checking
      FuncFloor.floor_P[floor_type[i]].free_info(floor_param[i]);
    }
    floor_param=null;

    for(int i=0; i<residues; i++){ // unpack does the range checking
      FuncResidue.residue_P[residue_type[i]].free_info(residue_param[i]);
    }
    residue_param=null;

    // the static codebooks *are* freed if you call info_clear, because
    // decode side does alloc a 'static' codebook. Calling clear on the
    // full codebook does not clear the static codebook (that's our
    // responsibility)
    for(int i=0; i<books; i++){
      // just in case the decoder pre-cleared to save space
      if(book_param[i]!=null){
        book_param[i].clear();
        book_param[i]=null;
      }
    }
    //if(vi->book_param)free(vi->book_param);
    book_param=null;

    for(int i=0; i<psys; i++){
      psy_param[i].free();
    }

  }