Maybe. Certainly Java and/or Kotlin are preferred. That said, applications are allowed to have native C/C++ libraries … which weakens/defeats the memory-safe advantages (https://developer.android.com/studio/projects/add-native-code). I think the main aspect of application safety in regard to memory is enforced by the OS ( https://source.android.com/docs/security/features ) — each app is run under a unique UID and is effectively isolated with resource availability managed via SELinux MACs …
2 Likes