* Updated the license header.
* Use new(nothrow) to allocate the MethodReplicant. * fSignature needs to be free()d, not deleted. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28318 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,18 +1,15 @@
|
|||||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
/*
|
||||||
//
|
* Copyright (c) 2004-2008, Haiku. All rights reserved.
|
||||||
// Copyright (c) 2004, Haiku
|
* Distributed under the terms of the MIT/X11 license.
|
||||||
//
|
*
|
||||||
// This software is part of the Haiku distribution and is covered
|
* Authors:
|
||||||
// by the Haiku license.
|
* Jérôme Duval
|
||||||
//
|
*/
|
||||||
//
|
|
||||||
// File: MethodReplicant.cpp
|
#include "MethodReplicant.h"
|
||||||
// Authors: Jérôme Duval,
|
|
||||||
//
|
#include <new>
|
||||||
// Description: Input Server
|
#include <string.h>
|
||||||
// Created: October 13, 2004
|
|
||||||
//
|
|
||||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <AppDefs.h>
|
#include <AppDefs.h>
|
||||||
@@ -24,8 +21,6 @@
|
|||||||
#include <Messenger.h>
|
#include <Messenger.h>
|
||||||
#include <PopUpMenu.h>
|
#include <PopUpMenu.h>
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include "MethodReplicant.h"
|
|
||||||
#include "remote_icon.h"
|
#include "remote_icon.h"
|
||||||
|
|
||||||
#include "InputServerTypes.h"
|
#include "InputServerTypes.h"
|
||||||
@@ -84,7 +79,7 @@ MethodReplicant::MethodReplicant(BMessage *message)
|
|||||||
MethodReplicant::~MethodReplicant()
|
MethodReplicant::~MethodReplicant()
|
||||||
{
|
{
|
||||||
delete fSegments;
|
delete fSegments;
|
||||||
delete fSignature;
|
free(fSignature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -95,7 +90,7 @@ MethodReplicant::Instantiate(BMessage *data)
|
|||||||
CALLED();
|
CALLED();
|
||||||
if (!validate_instantiation(data, REPLICANT_CTL_NAME))
|
if (!validate_instantiation(data, REPLICANT_CTL_NAME))
|
||||||
return NULL;
|
return NULL;
|
||||||
return new MethodReplicant(data);
|
return new(std::nothrow) MethodReplicant(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user