|
From: CVS C. to T. <the...@li...> - 2016-10-30 09:06:03
|
Revision: 733
http://sourceforge.net/p/themis/code/733
Author: mark_hellegers
Date: 2016-10-30 09:06:00 +0000 (Sun, 30 Oct 2016)
Log Message:
-----------
Variable lock is not a pointer, so it is better to initialize it this way as the other way seemed to leak memory. Fixes build on Haiku as the copy constructor is now private
Modified Paths:
--------------
trunk/themis/common/cacheuser.cpp
Modified: trunk/themis/common/cacheuser.cpp
===================================================================
--- trunk/themis/common/cacheuser.cpp 2016-06-26 20:38:51 UTC (rev 732)
+++ trunk/themis/common/cacheuser.cpp 2016-10-30 09:06:00 UTC (rev 733)
@@ -30,7 +30,7 @@
#include <string.h>
#include <Autolock.h>
#include <stdio.h>
-CacheUser::CacheUser(uint32 broadcast_target,uint32 usertoken,const char *Name) {
+CacheUser::CacheUser(uint32 broadcast_target,uint32 usertoken,const char *Name) : lock(true) {
broadcast_id=broadcast_target;
if (Name!=NULL) {
name=new char[strlen(Name)+1];
@@ -42,7 +42,6 @@
// printf("\tCacheUser: %ld %p - %s\n",id,name,name);
next=prev=NULL;
readpos=writepos=0L;
- lock=new BLocker(true);
}
CacheUser::CacheUser(CacheUser *cu) {
@@ -76,7 +75,6 @@
delete name;
name=NULL;
}
-// delete lock;
}
uint32 CacheUser::BroadcastID() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|