Skip to content

Commit

Permalink
Merge pull request #325 from Yaskawa-Global/memory_leak_fix
Browse files Browse the repository at this point in the history
Partial memory leak fix
  • Loading branch information
ted-miller authored Nov 15, 2024
2 parents 225ed07 + c91f6d4 commit 7fa3d6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/ServiceQueueTrajPoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ void Ros_ServiceQueueTrajPoint_Initialize()

//--------------
g_messages_QueueTrajPoint.response = motoros2_interfaces__srv__QueueTrajPoint_Response__create();
rosidl_runtime_c__String__init(&g_messages_QueueTrajPoint.response->message);

//--------------
MOTOROS2_MEM_TRACE_REPORT(svc_queue_point_init);
Expand Down
5 changes: 3 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void RosInitTask()
//==================================
FOREVER
{
MOTOROS2_MEM_TRACE_START(full_connection_cycle);
Ros_Controller_StatusInit();

Ros_Allocation_Initialize(&g_motoros2_Allocator);
Expand Down Expand Up @@ -143,8 +144,7 @@ void RosInitTask()
if (tid == ERROR)
mpSetAlarm(ALARM_TASK_CREATE_FAIL, APPLICATION_NAME " FAILED TO CREATE TASK", SUBCODE_EXECUTOR);

Ros_Debug_BroadcastMsg("Initialization complete. Memory available: (%d) bytes. Memory in use: (%d) bytes",
mpNumBytesFree(), MP_MEM_PART_SIZE - mpNumBytesFree());
Ros_Debug_BroadcastMsg("Initialization complete.");

//==================================
ULONG tickBefore = 0;
Expand Down Expand Up @@ -224,6 +224,7 @@ void RosInitTask()
Ros_Sleep(2500);

Ros_Debug_BroadcastMsg("Shutdown complete. Available memory: (%d) bytes", mpNumBytesFree());
MOTOROS2_MEM_TRACE_REPORT(full_connection_cycle);
}
}

Expand Down

0 comments on commit 7fa3d6c

Please sign in to comment.