< prev index next >

src/hotspot/share/runtime/os_perf.hpp

Print this page
*** 39,16 ***
      _key = NULL;
      _value = NULL;
    }
  
    ~EnvironmentVariable() {
!     if (_key != NULL) {
!       FREE_C_HEAP_ARRAY(char, _key);
-     }
-     if (_value != NULL) {
-       FREE_C_HEAP_ARRAY(char, _value);
-     }
    }
  
    EnvironmentVariable(char* key, char* value) {
      _key = key;
      _value = value;
--- 39,12 ---
      _key = NULL;
      _value = NULL;
    }
  
    ~EnvironmentVariable() {
!     FREE_C_HEAP_ARRAY(char, _key);
!     FREE_C_HEAP_ARRAY(char, _value);
    }
  
    EnvironmentVariable(char* key, char* value) {
      _key = key;
      _value = value;

*** 179,19 ***
    void set_command_line(char* command_line) {
      _command_line = command_line;
    }
  
    virtual ~SystemProcess(void) {
!     if (_name != NULL) {
!       FREE_C_HEAP_ARRAY(char, _name);
!     }
-     if (_path != NULL) {
-       FREE_C_HEAP_ARRAY(char, _path);
-     }
-     if (_command_line != NULL) {
-       FREE_C_HEAP_ARRAY(char, _command_line);
-     }
    }
  };
  
  class NetworkInterface : public ResourceObj {
   private:
--- 175,13 ---
    void set_command_line(char* command_line) {
      _command_line = command_line;
    }
  
    virtual ~SystemProcess(void) {
!     FREE_C_HEAP_ARRAY(char, _name);
!     FREE_C_HEAP_ARRAY(char, _path);
!     FREE_C_HEAP_ARRAY(char, _command_line);
    }
  };
  
  class NetworkInterface : public ResourceObj {
   private:
< prev index next >