Skip to content

Commit d644d27

Browse files
committed
remove no used backend state
1 parent 1183a98 commit d644d27

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

csrc/mmdeploy/triton/mmdeploy.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,13 @@ MMDEPLOY_EXPORT TRITONSERVER_Error* TRITONBACKEND_Initialize(TRITONBACKEND_Backe
5252
RETURN_IF_ERROR(TRITONSERVER_MessageSerializeToJson(backend_config_message, &buffer, &byte_size));
5353
LOG_MESSAGE(TRITONSERVER_LOG_INFO, (std::string("backend configuration:\n") + buffer).c_str());
5454

55-
// This backend does not require any "global" state but as an
56-
// example create a string to demonstrate.
57-
std::string* state = new std::string("backend state");
58-
RETURN_IF_ERROR(TRITONBACKEND_BackendSetState(backend, reinterpret_cast<void*>(state)));
59-
6055
return nullptr; // success
6156
}
6257

6358
// Triton calls TRITONBACKEND_Finalize when a backend is no longer
6459
// needed.
6560
//
6661
MMDEPLOY_EXPORT TRITONSERVER_Error* TRITONBACKEND_Finalize(TRITONBACKEND_Backend* backend) {
67-
// Delete the "global" state associated with the backend.
68-
void* vstate;
69-
RETURN_IF_ERROR(TRITONBACKEND_BackendState(backend, &vstate));
70-
std::string* state = reinterpret_cast<std::string*>(vstate);
71-
72-
LOG_MESSAGE(TRITONSERVER_LOG_INFO,
73-
(std::string("TRITONBACKEND_Finalize: state is '") + *state + "'").c_str());
74-
75-
delete state;
76-
7762
return nullptr; // success
7863
}
7964

0 commit comments

Comments
 (0)