|
|
|
|
|
by twic
1270 days ago
|
|
> as long as you follow very simple convention with TObject.Create() and TObject.Free; you won't have memory safety problems Is this the same as how in C, as long as you follow very simple convention with malloc() and free() you won't have memory safety problems? |
|
if you were to pass reference around, then compiler would warn about potentially dangerous Free.
I don't remember ever seeing Pascal code where you received raw pointer and then directly casted it to your object type for example. Pascal has very powerful and expressive type system