diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-21 17:40:04 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-21 17:40:04 -0800 |
| commit | 568a84ed2d3d41da5ca64cde15a677237fffd991 (patch) | |
| tree | 92ee212c0c8f4dc264acd0cef33285bddefd5a93 /perf | |
| parent | 434cdd9f4e9211b99ba62ff6973e082b90e098f0 (diff) | |
| download | nng-568a84ed2d3d41da5ca64cde15a677237fffd991.tar.gz nng-568a84ed2d3d41da5ca64cde15a677237fffd991.tar.bz2 nng-568a84ed2d3d41da5ca64cde15a677237fffd991.zip | |
Fix leaks in bus, socket leaks, tighten up close-side refcnting.
This does a few things. First it closes some preexisting leaks.
Second it tightens the overall close logic so that we automatically
discard idhash resources (while keeping numeric values for next id
etc. around) when the last socket is closed. This then eliminates
the need for applications to ever explicitly terminate resources.
It turns out platform-specific resources established at nni_init()
time might still be leaked, but it's also the case that we now no
longer dynamically allocate anything at platform initialization time.
(This presumes that the platform doesn't do so under the hood when
creating critical sections or mutexes for example.)
Diffstat (limited to 'perf')
| -rw-r--r-- | perf/perf.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/perf/perf.c b/perf/perf.c index 40b9c1f3..419d729f 100644 --- a/perf/perf.c +++ b/perf/perf.c @@ -20,17 +20,6 @@ // API, so don't be lazy like this! All nni_ symbols are subject to // change without notice, and not part of the stable API or ABI. #include "core/nng_impl.h" -#include "core/thread.c" -#include "core/clock.c" -#include "platform/posix/posix_impl.h" -#include "platform/posix/posix_alloc.c" -#include "platform/posix/posix_clock.c" -#include "platform/posix/posix_debug.c" -#include "platform/posix/posix_thread.c" -#include "platform/windows/win_impl.h" -#include "platform/windows/win_clock.c" -#include "platform/windows/win_debug.c" -#include "platform/windows/win_thread.c" static void latency_client(const char *, int, int); static void latency_server(const char *, int, int); @@ -107,12 +96,6 @@ nop(void) return (0); } -int -nni_init(void) -{ - return (nni_plat_init(nop)); -} - static void die(const char *fmt, ...) { |
