Changeset 213 for vtcross/trunk/src/shell/CognitiveRadioShell.cpp
- Timestamp:
- 03/26/09 13:23:40 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/shell/CognitiveRadioShell.cpp
r212 r213 42 42 PE_present = false; 43 43 CE_present = false; 44 45 // TODO =BUG= The params, observables, and utils arrays are not being 46 // allocated here. If an shell object is constructed, and then immediately 47 // destructed, there will be no allocated memory, and the delete operater 48 // will receive a null pointer, which will segfault. 44 49 } 45 50 … … 47 52 CognitiveRadioShell::~CognitiveRadioShell() 48 53 { 49 delete [] p ;50 delete [] o ;51 delete [] u ;54 delete [] params; 55 delete [] observables; 56 delete [] utils; 52 57 } 53 58 … … 58 63 LOG("Creating Cognitive Radio Shell.\n"); 59 64 60 p = new Parameter[10];61 o = new Observable[10];62 u = new Utility[10];65 params = new Parameter[10]; 66 observables = new Observable[10]; 67 utils = new Utility[10]; 63 68 radio_info = new Radio_Info; 64 69 65 LoadRadioConfiguration(radioConfig, p , u, o, radio_info);70 LoadRadioConfiguration(radioConfig, params, utils, observables, radio_info); 66 71 67 72 primaryPort = p1;