File tree Expand file tree Collapse file tree 7 files changed +8
-8
lines changed Expand file tree Collapse file tree 7 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ pub unsafe fn callback_source_create() -> *mut CallbackSource {
4343
4444pub unsafe fn callback_source_destroy ( cb_source : * mut CallbackSource ) {
4545 if !cb_source. is_null ( ) {
46- Box :: from_raw ( cb_source) ;
46+ drop ( Box :: from_raw ( cb_source) ) ;
4747 }
4848}
4949
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub unsafe fn test_class_create(value: u32) -> *mut TestClass {
1515pub unsafe fn test_class_destroy ( testclass : * mut TestClass ) {
1616 CONSTRUCTION_COUNTER -= 1 ;
1717 if !testclass. is_null ( ) {
18- Box :: from_raw ( testclass) ;
18+ drop ( Box :: from_raw ( testclass) ) ;
1919 } ;
2020}
2121
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ pub unsafe fn string_collection_create() -> *mut StringCollection {
3737
3838pub unsafe fn string_collection_destroy ( col : * mut StringCollection ) {
3939 if !col. is_null ( ) {
40- Box :: from_raw ( col) ;
40+ drop ( Box :: from_raw ( col) ) ;
4141 }
4242}
4343
@@ -57,7 +57,7 @@ pub unsafe fn string_collection_with_reserve_create(
5757
5858pub unsafe fn string_collection_with_reserve_destroy ( col : * mut StringCollectionWithReserve ) {
5959 if !col. is_null ( ) {
60- Box :: from_raw ( col) ;
60+ drop ( Box :: from_raw ( col) ) ;
6161 }
6262}
6363
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ pub(crate) unsafe fn class_with_password_get_special_value(
5555
5656pub ( crate ) unsafe fn class_with_password_destroy ( instance : * mut crate :: ClassWithPassword ) {
5757 if !instance. is_null ( ) {
58- Box :: from_raw ( instance) ;
58+ drop ( Box :: from_raw ( instance) ) ;
5959 }
6060}
6161
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub(crate) fn primitive_pointers_create() -> *mut crate::PrimitivePointers {
2121}
2222
2323pub ( crate ) unsafe fn primitive_pointers_destroy ( instance : * mut crate :: PrimitivePointers ) {
24- Box :: from_raw ( instance) ;
24+ drop ( Box :: from_raw ( instance) ) ;
2525}
2626
2727pub ( crate ) unsafe fn primitive_pointers_get_bool (
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ pub unsafe fn string_class_create() -> *mut StringClass {
1919
2020pub unsafe fn string_class_destroy ( string_class : * mut StringClass ) {
2121 if !string_class. is_null ( ) {
22- Box :: from_raw ( string_class) ;
22+ drop ( Box :: from_raw ( string_class) ) ;
2323 }
2424}
2525
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ pub(crate) fn thread_class_create(
8080
8181pub ( crate ) unsafe fn thread_class_destroy ( instance : * mut ThreadClass ) {
8282 if !instance. is_null ( ) {
83- Box :: from_raw ( instance) ;
83+ drop ( Box :: from_raw ( instance) ) ;
8484 }
8585}
8686
You can’t perform that action at this time.
0 commit comments