================ idProgram::FreeData ================ */
| 1918 | ================ |
| 1919 | */ |
| 1920 | void idProgram::FreeData( void ) { |
| 1921 | int i; |
| 1922 | |
| 1923 | // free the defs |
| 1924 | varDefs.DeleteContents( true ); |
| 1925 | varDefNames.DeleteContents( true ); |
| 1926 | varDefNameHash.Free(); |
| 1927 | |
| 1928 | returnDef = NULL; |
| 1929 | returnStringDef = NULL; |
| 1930 | sysDef = NULL; |
| 1931 | |
| 1932 | // free any special types we've created |
| 1933 | types.DeleteContents( true ); |
| 1934 | |
| 1935 | filenum = 0; |
| 1936 | |
| 1937 | numVariables = 0; |
| 1938 | memset( variables, 0, sizeof( variables ) ); |
| 1939 | |
| 1940 | // clear all the strings in the functions so that it doesn't look like we're leaking memory. |
| 1941 | for( i = 0; i < functions.Num(); i++ ) { |
| 1942 | functions[ i ].Clear(); |
| 1943 | } |
| 1944 | |
| 1945 | filename.Clear(); |
| 1946 | fileList.Clear(); |
| 1947 | statements.Clear(); |
| 1948 | functions.Clear(); |
| 1949 | |
| 1950 | top_functions = 0; |
| 1951 | top_statements = 0; |
| 1952 | top_types = 0; |
| 1953 | top_defs = 0; |
| 1954 | top_files = 0; |
| 1955 | |
| 1956 | filename = ""; |
| 1957 | } |
| 1958 | |
| 1959 | /* |
| 1960 | ================ |
nothing calls this directly
no test coverage detected