diff --git a/include/darknet.h b/include/darknet.h index 892ad71b..14767beb 100644 --- a/include/darknet.h +++ b/include/darknet.h @@ -984,6 +984,7 @@ LIB_API network *load_network(char *cfg, char *weights, int clear); LIB_API network *load_network_custom(char *cfg, char *weights, int clear, int batch); LIB_API network *load_network(char *cfg, char *weights, int clear); LIB_API void free_network(network net); +LIB_API void free_network_ptr(network* net); // network.c LIB_API load_args get_base_args(network *net); diff --git a/src/network.c b/src/network.c index c3c08cee..a28a3429 100644 --- a/src/network.c +++ b/src/network.c @@ -1164,6 +1164,11 @@ float network_accuracy_multi(network net, data d, int n) return acc; } +void free_network_ptr(network* net) +{ + free_network(*net); +} + void free_network(network net) { int i;