zhztheplayer commented on code in PR #10111:
URL: 
https://github.com/apache/incubator-gluten/pull/10111#discussion_r2184227879


##########
cpp/core/utils/ObjectStore.cc:
##########
@@ -37,23 +37,31 @@ gluten::ResourceMap<gluten::ObjectStore*>& 
gluten::ObjectStore::stores() {
 }
 
 gluten::ObjectStore::~ObjectStore() {
-  // destructing in reversed order (the last added object destructed first)
-  const std::lock_guard<std::mutex> lock(mtx_);
-  for (auto itr = aliveObjects_.rbegin(); itr != aliveObjects_.rend(); itr++) {
-    const ResourceHandle handle = (*itr).first;
-    const auto& info = (*itr).second;
-    const std::string_view typeName = info.typeName;
-    const size_t size = info.size;
-    VLOG(2) << "Unclosed object ["
-            << "Store ID: " << storeId_ << ", Resource handle ID: " << handle 
<< ", TypeName: " << typeName
-            << ", Size: " << size
-            << "] is found when object store is closing. Gluten will"
-               " destroy it automatically but it's recommended to manually 
close"
-               " the object through the Java closing API after use,"
-               " to minimize peak memory pressure of the application.";
-    store_.erase(handle);
+  std::vector<std::shared_ptr<void>> objects;

Review Comment:
   I searched for usages of this vector but found nothing. Is it intended to be 
updated in the loop or something?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to