Misc: fix bugs that were preventing starting a new stream after disconnecting. Known issue: this leaks a bit of memory. This also removes all OSX-specific code from the Apple example I used, as I have no intention of using this on Mac.
This commit is contained in:
1 parent
e57f0cd723
commit
e5fc439da2
11 files changed
+81
-162
No files matched your search
@@ -24,6 +24,7 @@ struct PlotDef {
|
||||
- (instancetype _Nonnull)init NS_UNAVAILABLE;
|
||||
+ (instancetype _Nonnull)new NS_UNAVAILABLE;
|
||||
|
||||
- (void)clearData;
|
||||
- (void)observeFloat:(int)plotId value:(CFTimeInterval)value;
|
||||
- (void)observeFloatReturnMetrics:(int)plotId value:(CFTimeInterval)value plotMetrics:(PlotMetrics * _Nullable)plotMetrics;
|
||||
|
||||
|
||||
@@ -92,4 +92,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void) clearData {
|
||||
for (int i = 0; i < PlotCount; i++) {
|
||||
if (_plots[i].buffer) {
|
||||
[_plots[i].buffer clear];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user