memset sets an area of memory to the value specified. In paracharlies example the memory area "new" points to is overwritten with the value "0" at a length of "sizeof(PERSO)" (= 12) bytes. This is a good practice in c to avoid vagabonding pointers.

I didn't know that there is a connection betweeen sys_malloc and game_save. I didn't find any hints in the manual on that topic...

The handle thing is really easy. You can call handle() to get the handle of any engine object, regardless if it is string, a bitmap, or whatever. You can convert that handle to a pointer easily by calling ptr_for_handle(). It works the same as handle(), just the other way around. The advantage is, that handles - unlike pointers - are even valid after a save / load or even after a complete game or computer restart. If you just want to save "pointers" to engine objects like panels, strings and the like a combination of handles and structs could be an elegant solution for you.

EDIT: Charlie was faster... ^^

EDIT2: memset has absolutely nothing to do with memory allocation. See my explanation above... The code above does not really help with the problem as the struct does not contain any pointers...


Always learn from history, to be sure you make the same mistakes again...