mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-21 01:24:21 +00:00
Another batch of ScopedPointer cleanups
This commit is contained in:
parent
5b13063162
commit
48a5fbd333
74 changed files with 311 additions and 292 deletions
|
|
@ -37,7 +37,7 @@ InterprocessConnection::InterprocessConnection (bool callbacksOnMessageThread, u
|
|||
: useMessageThread (callbacksOnMessageThread),
|
||||
magicMessageHeader (magicMessageHeaderNumber)
|
||||
{
|
||||
thread = new ConnectionThread (*this);
|
||||
thread.reset (new ConnectionThread (*this));
|
||||
}
|
||||
|
||||
InterprocessConnection::~InterprocessConnection()
|
||||
|
|
@ -56,7 +56,7 @@ bool InterprocessConnection::connectToSocket (const String& hostName,
|
|||
disconnect();
|
||||
|
||||
const ScopedLock sl (pipeAndSocketLock);
|
||||
socket = new StreamingSocket();
|
||||
socket.reset (new StreamingSocket());
|
||||
|
||||
if (socket->connect (hostName, portNumber, timeOutMillisecs))
|
||||
{
|
||||
|
|
@ -179,7 +179,7 @@ int InterprocessConnection::writeData (void* data, int dataSize)
|
|||
void InterprocessConnection::initialiseWithSocket (StreamingSocket* newSocket)
|
||||
{
|
||||
jassert (socket == nullptr && pipe == nullptr);
|
||||
socket = newSocket;
|
||||
socket.reset (newSocket);
|
||||
connectionMadeInt();
|
||||
thread->startThread();
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ void InterprocessConnection::initialiseWithSocket (StreamingSocket* newSocket)
|
|||
void InterprocessConnection::initialiseWithPipe (NamedPipe* newPipe)
|
||||
{
|
||||
jassert (socket == nullptr && pipe == nullptr);
|
||||
pipe = newPipe;
|
||||
pipe.reset (newPipe);
|
||||
connectionMadeInt();
|
||||
thread->startThread();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue