issues about resize in python ctypes
===

I found one answer of resize an array in python ctypes 

    from ctypes import *

    list = (c_int*1)()
    
    def customresize(array, new_size):
        resize(array, sizeof(array._type_)*new_size)
        return (array._type_*new_size).from_address(addressof(array))
    
    list[0] = 123
    list = customresize(list, 5)
    
    >>> list[0]
    123
    >>> list[4]
    0
if i call it again:

    list = customresize(list, 40)

it gives error: 

    ValueError: Memory cannot be resized because this object doesn't own it

why it works only for the first time you call `customresize()`?
I also saw some one post another answer:

    def customresize(array, new_size):
        return (array._type_*new_size).from_address(addressof(array))

here `customresize()` works no matter how many times you call it.

but it raises another question, i found my python.exe does not use more memory when you resize `list` to a larger size, which means the memory is not allocated for the resized `list`. Is that very dangerous to give the accessibility to memory without allocation? why `ctypes.resize` is designed this way? Really get confused....