stupid question, sorry
first question
void init_something(...){
VkTypeSomething data[100];
VkResourceStruct resource={... .pointer_data=data};
VkCreateSomething(... , resource); //isit safe? resource[] is not lost?
}
void vk_clean(...){
VkDestroySomething_that_use_resource(...);
// free resource?
}
second question
same code, changes VkTypeSomething *data;
and data=malloc(...);
(no free in function)
when I need to free that data if I malloc it, and do I need to free it
Vulkan pages tell that "structures are destroyed on VkDestroy... call" and "VkDestroy... must have valid poiinters in structures on call" so there no way to free it before call (I know it can not work like this)
so there no way to get pointer inside structure that was created somewhere... do I need save all my created pointers and free them my self, after VkDestroy?
look like I understand, but still not sure as I understand its "VkCreate... use setup-data only once" and it safe to delete everything after call VkCreate... its true?