Skip to content

Drop trait not working #3

@shelmesky

Description

@shelmesky

Sorry to bother you, but it seems that the Drop::drop() trait is not working correctly for Vector?

impl<type T> Drop for Vector<T> {
	void drop(mut& self) {
		printf(c"<Vector<T> as Drop>::drop() called!\n");   // this line not print
	
		if self.capacity > 0 {
			free(self.data as void mut*);
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions