[Vala] [vala] how to call mem_set_vtable?



vala code:

int main ()
{
  mem_set_vtable (mem_profiler_table);
  return 0;
}

will generate:

#include <glib.h>
#include <glib-object.h>

gint _main (void);

gint _main (void) {
        gint result;
        g_mem_set_vtable (glib_mem_profiler_table);
        result = 0;
        return result;
}

int main (int argc, char ** argv) {
        g_type_init (); 
        return _main (); 
}

there has a problem, g_mem_set_vtable () must be called before using any
other GLib functions.

How to call mem_set_vtable ?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]