IP_ADAPTER_INFO *ptr=new IP_ADAPTER_INFO[100];
if I free using
delete ptr;
will it lead to memory leak, if not t
Using delete operator on allocations with new T[n] is undefined and will vary from compiler to compiler. AFAIK, MSVC compiler for example will produce different code than GCC.
If A points to an array that was allocated via new T[n], then you must delete it via delete[] A. The difference between delete and delete[] is straightforward - the former destroys a scalar object and the latter destroys an array.