Applying modifiers to the copy of the object - how?

I’ve been porting an add-on from Blender 2.79 to 2.80 (although I am not a programmer, someone had to do this). Got most of the things sorted out except a few quality of life features.

This code below applies modifiers to the object(s) (selected mesh in Object mode), passes them to the functions that writes data into export file format and then deletes said objects. So I end up with empty scene (which isn’t what I want).

for object in bpy.context.selected_objects:
    if object.type == 'MESH': = object
       if (self.option_copy):
            orig_mesh =
            depsgraph = context.evaluated_depsgraph_get()
            object_eval = object.evaluated_get(depsgraph)                    
            meshes = [, preserve_all_data_layers=True)]
            bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Triangulate")
            for mesh in meshes:
       = mesh
                aseGeom += str(cGeomObject(object_eval))

   = mesh
            for mesh in meshes:
            aseGeom = str( cGeomObject( object ) )

Can someone please modify this code so that modifiers are applied to the copy of the object, passed to the function, then the copy is deleted ? This way stuff gets exported and user ends up with intact scene.

Thanks beforehand