In one C++ open source project, I see this.
struct SomeClass { ... size_t data_length; char data[1]; ... }
What are the advantages
The structure can be simply allocated as a single block of memory instead of multiple allocations that must be freed.
It actually uses less memory because it doesn't need to store the pointer itself.
There may also be performance advantages with caching due to the memory being contiguous.