Browse Source

* free fsem and feventsection in TEventObject destructor (please check
win32/wince too, it seems they don't free the handle that's allocated
in their constructor either)

git-svn-id: trunk@3017 -

Jonas Maebe 19 years ago
parent
commit
1c9377470a
5 changed files with 10 additions and 0 deletions
  1. 2 0
      fcl/darwin/syncobjs.pp
  2. 2 0
      fcl/freebsd/syncobjs.pp
  3. 2 0
      fcl/linux/syncobjs.pp
  4. 2 0
      fcl/netwlibc/syncobjs.pp
  5. 2 0
      fcl/solaris/syncobjs.pp

+ 2 - 0
fcl/darwin/syncobjs.pp

@@ -120,6 +120,8 @@ destructor TEventObject.destroy;
 
 begin
   sem_destroy(psem_t(FSem));
+  dispose(FSem);
+  FEventSection.Free;
 end;
 
 procedure TEventObject.ResetEvent;

+ 2 - 0
fcl/freebsd/syncobjs.pp

@@ -120,6 +120,8 @@ destructor TEventObject.destroy;
 
 begin
   sem_destroy(psem_t(FSem));
+  dispose(FSem);
+  FEventSection.Free;
 end;
 
 procedure TEventObject.ResetEvent;

+ 2 - 0
fcl/linux/syncobjs.pp

@@ -120,6 +120,8 @@ destructor TEventObject.destroy;
 
 begin
   sem_destroy(FSem);
+  dispose(FSem);
+  FEventSection.Free;
 end;
 
 procedure TEventObject.ResetEvent;

+ 2 - 0
fcl/netwlibc/syncobjs.pp

@@ -119,6 +119,8 @@ destructor TEventObject.destroy;
 
 begin
   sem_destroy(FSem);
+  dispose(FSem);
+  FEventSection.Free;
 end;
 
 procedure TEventObject.ResetEvent;

+ 2 - 0
fcl/solaris/syncobjs.pp

@@ -120,6 +120,8 @@ destructor TEventObject.destroy;
 
 begin
   sem_destroy(psem_t(FSem));
+  dispose(FSem);
+  FEventSection.Free;
 end;
 
 procedure TEventObject.ResetEvent;