Chasing a leak that looks like an EBT clock. Deleted some unneeded code and adding a missing JS free.

This commit is contained in:
2024-03-17 13:44:05 +00:00
parent 5e240de677
commit e5ba51b80a
4 changed files with 1 additions and 31 deletions

View File

@ -287,7 +287,6 @@ typedef struct _tf_ssb_connection_t
tf_ssb_blob_wants_t blob_wants;
bool sent_clock;
int32_t ebt_request_number;
JSValue ebt_send_clock;
JSValue object;
@ -1862,8 +1861,6 @@ static void _tf_ssb_connection_destroy(tf_ssb_connection_t* connection, const ch
if (JS_IsUndefined(connection->object) && !connection->async.data && !connection->tcp.data && !connection->connect.data && connection->ref_count == 0)
{
JS_FreeValue(ssb->context, connection->ebt_send_clock);
connection->ebt_send_clock = JS_UNDEFINED;
tf_free(connection->message_requests);
connection->message_requests = NULL;
connection->message_requests_count = 0;
@ -3594,19 +3591,6 @@ void tf_ssb_connection_set_ebt_request_number(tf_ssb_connection_t* connection, i
connection->ebt_request_number = request_number;
}
JSValue tf_ssb_connection_get_ebt_send_clock(tf_ssb_connection_t* connection)
{
JSContext* context = connection->ssb->context;
return JS_DupValue(context, connection->ebt_send_clock);
}
void tf_ssb_connection_set_ebt_send_clock(tf_ssb_connection_t* connection, JSValue send_clock)
{
JSContext* context = connection->ssb->context;
JS_FreeValue(context, connection->ebt_send_clock);
connection->ebt_send_clock = JS_DupValue(context, send_clock);
}
JSValue tf_ssb_get_disconnection_debug(tf_ssb_t* ssb, JSContext* context)
{
JSValue result = JS_NewObject(context);