mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[PR #411] [MERGED] Use explicit memory ownership in SocketMultiplexer #1627
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#1627
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/debauchee/barrier/pull/411
Author: @p12tic
Created: 8/22/2019
Status: ✅ Merged
Merged: 8/22/2019
Merged by: @AdrianKoshka
Base:
master← Head:rewrite-memory-management📝 Commits (2)
8dd6bc2Make ownership of SocketMultiplexer explicita841b28Make ownership of SocketMultiplexerJob explicit📊 Changes
14 files changed (+156 additions, -154 deletions)
View changed files
📝
src/lib/barrier/App.cpp(+1 -1)📝
src/lib/barrier/App.h(+5 -3)📝
src/lib/barrier/ClientApp.cpp(+1 -2)📝
src/lib/barrier/ServerApp.cpp(+1 -2)📝
src/lib/net/ISocketMultiplexerJob.h(+22 -9)📝
src/lib/net/SecureSocket.cpp(+23 -20)📝
src/lib/net/SecureSocket.h(+3 -9)📝
src/lib/net/SocketMultiplexer.cpp(+34 -38)📝
src/lib/net/SocketMultiplexer.h(+3 -4)📝
src/lib/net/TCPListenSocket.cpp(+13 -14)📝
src/lib/net/TCPListenSocket.h(+2 -4)📝
src/lib/net/TCPSocket.cpp(+34 -27)📝
src/lib/net/TCPSocket.h(+7 -10)📝
src/lib/net/TSocketMultiplexerMethodJob.h(+7 -11)📄 Description
The code of SocketMultiplexer is extremely hard to follow, as the ownership of various data is not clear. This PR fixes that by making ownership explicit by using
std::unique_ptr. While no memory leaks have been detected or fixed, this will make this basically impossible in the future.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.