开发者

Glib: Can I reuse a pointer queued to be freed with g_test_queue_free?

开发者 https://www.devze.com 2023-01-05 01:58 出处:网络
Using Glib Testing framework, I would like to know if开发者_如何学JAVA I can reuse a pointer queued to be freed with g_test_queue_free?

Using Glib Testing framework, I would like to know if开发者_如何学JAVA I can reuse a pointer queued to be freed with g_test_queue_free?

Here's a code sample of what I'm trying to do:

static void some_test()
{
  gchar* tmp;

  tmp = func_returning_gchar_ptr (...params...);
  g_assert(tmp);
  g_test_queue_free(tmp);

  tmp = func_returning_gchar_ptr (...params...);
  g_assert(tmp);
  g_test_queue_free(tmp);

  ...
}


Yes that should be fine

0

精彩评论

暂无评论...
验证码 换一张
取 消