summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <erwincoumans@google.com>2019-05-06 17:13:42 -0700
committerErwin Coumans <erwincoumans@google.com>2019-05-06 17:13:42 -0700
commit688df2c60bb7d2d3ab9dfcacfd3fa663d6acb8c9 (patch)
tree5f6e94c3ad735d33c3627cd86434995610b293f7
parentf4f5f70886e8d85bb5c000fe0c443fbf958f45d8 (diff)
downloadbullet3-688df2c60bb7d2d3ab9dfcacfd3fa663d6acb8c9.tar.gz
fix exceeding shared memory usage, return of member of deleted class.
-rw-r--r--examples/SharedMemory/SharedMemoryPublic.h2
-rw-r--r--examples/SharedMemory/plugins/grpcPlugin/grpcPlugin.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/examples/SharedMemory/SharedMemoryPublic.h b/examples/SharedMemory/SharedMemoryPublic.h
index b2c2f6c68..6c62c788e 100644
--- a/examples/SharedMemory/SharedMemoryPublic.h
+++ b/examples/SharedMemory/SharedMemoryPublic.h
@@ -952,7 +952,7 @@ struct b3ForwardDynamicsAnalyticsIslandData
double m_remainingLeastSquaresResidual;
};
-#define MAX_ISLANDS_ANALYTICS 1024
+#define MAX_ISLANDS_ANALYTICS 64
struct b3ForwardDynamicsAnalyticsArgs
{
diff --git a/examples/SharedMemory/plugins/grpcPlugin/grpcPlugin.cpp b/examples/SharedMemory/plugins/grpcPlugin/grpcPlugin.cpp
index eb6c04d9f..7a0d4888a 100644
--- a/examples/SharedMemory/plugins/grpcPlugin/grpcPlugin.cpp
+++ b/examples/SharedMemory/plugins/grpcPlugin/grpcPlugin.cpp
@@ -206,7 +206,9 @@ private:
{
GPR_ASSERT(status_ == FINISH);
// Once in the FINISH state, deallocate ourselves (CallData).
+ CallData tmpStatus = status_;
delete this;
+ return tmpStatus;
}
return status_;
}